1(function($) { 2 $(document).ready(function() { 3 // alert('sdsd'); 4 $('.course-progress').each(function(i, e) { 5 var progress_bar = $('.user-progress', e); 6 var progress = 0; 7 var interval = setInterval(expand_progress, 10); 8 var target_progress = progress_bar.data('value'); 9 progress_bar.html(target_progress + '%'); 10 function expand_progress() { 11 if (progress >= target_progress) { 12 clearInterval(interval); 13 } else { 14 progress++; 15 progress_bar.width(progress + '%'); 16 } 17 } 18 }); 19 20 $('.mpcs-reset-course-progress').on('click', function(e) { 21 e.preventDefault(); 22 if (confirm('Are you sure you want to reset course progress?')) { 23 let user_progress = $(this).closest('tr').find('.course-progress'); 24 let params = { 25 action: 'mpcs_reset_course_progress', 26 course_id: $(this).data('value'), 27 user_id: $(this).data('user'), 28 nonce: $(this).data('nonce'), 29 }; 30 31 $.post(ajaxurl, params, function(res) { 32 user_progress.html('<div class="user-progress" data-value="0">0%</div>') 33 }) 34 } 35 }); 36 37 38 }); 39})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.