https://mangboard.com/wp-content/plugins/mangboard/plugins/widgets…/js/jquery.mb.rolling2.js?ver=227
1(function ( $ ) { 2 $.fn.mbRolling2 = function( options ) { 3 this.each(function(index){ 4 var settings = $.extend({ 5 auto_play: true, 6 width: '100%', 7 height: '100%', 8 auto_speed: 2500, 9 speed: 500, 10 direction:'up' 11 }, options ); 12 var $target; 13 var timerID; 14 function init(obj){ 15 $target = jQuery(obj); 16 if($target.find('.mb-text-slide-item').length<2) return; 17 var width = settings.width; 18 var height = settings.height; 19 $target.css( {'overflow':'hidden', 'position':'relative', 'width':width, 'height':height} ); 20 var direction = settings.direction; 21 if(direction=='left'){ 22 $target.wrapInner('<div class="mb-rolling-box" style="width:'+($target.width()*2)+'px;height:100%;position:absolute;left:0;top:0;"></div>'); 23 $target.find('.mb-rolling-box>div').css( {'display':'inline-block', 'width':width, 'float':'left'} ); 24 }else if(direction=='right'){ 25 $target.wrapInner('<div class="mb-rolling-box" style="width:'+($target.width()*2)+'px;height:100%;position:absolute;right:0;top:0;"></div>'); 26 $target.find('.mb-rolling-box>div').css( {'display':'inline-block', 'width':width, 'float':'right'} ); 27 }else{ 28 $target.wrapInner('<div class="mb-rolling-box" style="width:100%;height:100%;position:absolute;left:0;top:0;"></div>'); 29 } 30 timerID = setInterval(function(){ rolling() }, settings.auto_speed); 31 jQuery(window).focus(function () { 32 if(timerID) clearInterval(timerID); 33 timerID = setInterval(function(){ rolling() }, settings.auto_speed); 34 }).blur(function () { 35 if(timerID) clearInterval(timerID); 36 }); 37 } 38 function rolling(){ 39 var direction = settings.direction; 40 var attr1 = 'top'; 41 var attr2 = 'first'; 42 if(direction=='down'){ 43 attr2 = 'last'; 44 } 45 if(!$target.is(":hover")){ 46 var $move_target = $target.find('.mb-rolling-box>div').first(); 47 var $rolling_box = $target.find('.mb-rolling-box'); 48 var rolling_move; 49 if(direction=='up' || direction=='down'){ 50 rolling_move = $move_target.outerHeight(); 51 }else{ 52 rolling_move = $move_target.width(); 53 } 54 var ani_options = {}; 55 if(direction=='up'){ 56 ani_options = {top:'-='+rolling_move}; 57 }else if(direction=='down'){ 58 ani_options = {top:0}; 59 }else if(direction=='left'){ 60 attr1 = 'left'; 61 ani_options = {left:'-='+rolling_move}; 62 }else if(direction=='right'){ 63 attr1 = 'right'; 64 ani_options = {right:'-='+rolling_move}; 65 } 66 $move_target.animate({opacity: 0.2}, 300); 67 if(direction=='down'){ 68 var $move_target2 = $target.find('.mb-rolling-box>div:last'); 69 $move_target2.prependTo($rolling_box); 70 $move_target2.show(); 71 $rolling_box.css(attr1, $move_target2.outerHeight()*(-1)); 72 $rolling_box.animate(ani_options, settings.speed, function() { 73 $move_target.animate({opacity: 1},0).hide(); 74 }); 75 }else{ 76 $move_target.next().show(); 77 $rolling_box.animate(ani_options, settings.speed, function() { 78 $rolling_box.css(attr1, 0); 79 $move_target.appendTo($rolling_box).animate({opacity: 1},0).hide(); 80 }); 81 } 82 } 83 } 84 init(this); 85 }); 86 return this; 87 }; 88}( 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.