1jQuery(document).ready(function ($) { 2 const barWidth = $('.news-moving-banner-container').outerWidth(); 3 console.log(barWidth); 4 5 let nextLeftVal = 0; 6 const intervalTimeout = 20; 7 8 let bannerInterval = setInterval(bannerMovement, intervalTimeout); 9 10 function bannerMovement(){ 11 let currentLeftVal = parseInt($('.news-moving-banner .news-moving-banner-container').css('left')); 12 // console.log(currentLeftVal); 13 if(-currentLeftVal >= barWidth){ 14 nextLeftVal = '0px'; 15 clearInterval(bannerInterval); 16 setTimeout(function() { 17 console.log("pause"); 18 bannerInterval = setInterval(bannerMovement, intervalTimeout); 19 }, 1000); 20 } 21 else{ 22 nextLeftVal = (currentLeftVal - 2) + 'px'; 23 } 24 25 $('.news-moving-banner .news-moving-banner-container').css('left', nextLeftVal); 26 } 27 28 // $('.news-moving-banner .news-moving-banner').on('mouseover', function(){ 29 // clearInterval(bannerInterval); 30 // }); 31 32 $('.news-moving-banner .news-moving-banner-container').on({ 33 mouseenter: function () { 34 clearInterval(bannerInterval); 35 }, 36 mouseleave: function () { 37 bannerInterval = setInterval(bannerMovement, intervalTimeout); 38 } 39 }); 40 41 $('#menu-item-244830 a').attr('target', '_blank'); 42 $('#menu-item-244830 a').attr('rel', 'noopener'); 43 44});
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.