Guest User

Untitled

a guest
Nov 24th, 2020
25
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. !function(t,e,o,i){var s="easyTicker",n={direction:"up",easing:"swing",speed:"slow",interval:2e3,height:"auto",visible:0,mousePause:!0,controls:{up:"",down:"",toggle:"",playText:"Play",stopText:"Stop"},callbacks:{before:!1,after:!1}};function l(e,o){var i=this;function s(){i.timer=setInterval(function(){1==i.winFocus&&r(i.opts.direction)},i.opts.interval),t(i.opts.controls.toggle).addClass("et-run").html(i.opts.controls.stopText)}function l(){clearInterval(i.timer),i.timer=0,t(i.opts.controls.toggle).removeClass("et-run").html(i.opts.controls.playText)}function r(t){var e,o,s;if(i.elem.is(":visible")){"up"==t?(e=":first-child",o="-=",s="appendTo"):(e=":last-child",o="+=",s="prependTo");var n=i.targ.children(e),l=n.outerHeight();"function"==typeof i.opts.callbacks.before&&i.opts.callbacks.before.call(i,i.targ,n),i.targ.stop(!0,!0).animate({top:o+l+"px"},i.opts.speed,i.opts.easing,function(){n.hide()[s](i.targ).fadeIn(),i.targ.css("top",0),c(!0),"function"==typeof i.opts.callbacks.after&&i.opts.callbacks.after.call(i,i.targ,n)})}}function a(t){l(),r("up"==t?"up":"down")}function c(e){var o,s;"auto"==i.opts.height&&(i.opts.visible>0?function(e){var o=0;i.targ.children().removeClass("et-item-visible"),i.targ.children(":lt("+i.opts.visible+")").each(function(){o+=t(this).outerHeight(),t(this).addClass("et-item-visible")}),e?i.elem.stop(!0,!0).animate({height:o},i.opts.speed):i.elem.css("height",o)}(e):(o=0,s=i.elem.css("display"),i.elem.css("display","block"),i.targ.children().each(function(){o+=t(this).outerHeight()}),i.elem.css({display:s,height:o}))),e||clearInterval(i.heightTimer)}return i.opts=t.extend({},n,o),i.elem=t(e),i.targ=t(e).children(":first-child"),i.timer=0,i.winFocus=1,i.elem.children().css("margin",0).children().css("margin",0),i.elem.css({position:"relative",height:i.opts.height,overflow:"hidden"}),i.targ.css({position:"absolute",margin:0}),i.heightTimer=setInterval(function(){c(!1)},100),s(),i.opts.mousePause&&i.elem.mouseenter(function(){i.timerTemp=i.timer,l()}).mouseleave(function(){0!==i.timerTemp&&s()}),t(i.opts.controls.up).on("click",function(t){t.preventDefault(),a("up")}),t(i.opts.controls.down).on("click",function(t){t.preventDefault(),a("down")}),t(i.opts.controls.toggle).on("click",function(t){t.preventDefault(),0==i.timer?s():l()}),{up:function(){a("up")},down:function(){a("down")},start:s,stop:l,options:i.opts}}t.fn[s]=function(e){return this.each(function(){t.data(this,s)||t.data(this,s,new l(this,e))})}}(jQuery,window,document);
RAW Paste Data