From 1c5ee7cefb2086263bb74802ec23c23dd104236d Mon Sep 17 00:00:00 2001 From: Dibyajyoti Panda Date: Fri, 15 Mar 2019 17:16:00 +0530 Subject: [PATCH] Fix #1 --- assets/js/jquery.tickerNews.min.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 assets/js/jquery.tickerNews.min.js diff --git a/assets/js/jquery.tickerNews.min.js b/assets/js/jquery.tickerNews.min.js new file mode 100644 index 0000000..3d92f6e --- /dev/null +++ b/assets/js/jquery.tickerNews.min.js @@ -0,0 +1 @@ +!function(a){a.fn.newsTicker=function(b){if(a(this).length<1)return this;var c=a.extend(!0,{base:{width:2100,time:4e4},itemWidth:"auto",ticker:".ti_news",tickerClone:"ti_clone",wrapper:".ti_wrapper",slide:".ti_slide",content:".ti_content",callbacks:{beforeLoad:function(a){},onLoad:function(a,b){},beforeAnimation:function(a,b){},completeAnimation:function(a,b){},isPaused:function(a,b){},isResumed:function(a,b){}},core:{_getTime:function(a){return baseMargin="undefined"==typeof $contentTickers?0:$contentTickers.first().css("margin-left"),baseMargin=baseMargin<0?baseMargin:0,c.base.time*(a/(baseMargin+c.base.width))},_contentWidth:function(b){var d=0;return"auto"!==c.itemWidth&&0!==c.itemWidth?(d=b.length*c.itemWidth,b.width(c.itemWidth)):b.each(function(){d+=a(this).width()}),Math.ceil(d+2)}}},b);return a(this).each(function(){var b=a(this);b.data("ticker",{stop:!0,animation:null}),c.callbacks.beforeLoad(a(this));var j,d=b.find(c.ticker),e=b.find(c.wrapper),f=b.find(c.slide),g=b.find(c.content),h=c.core._contentWidth(d),i=e.width(),k=a();if(hf.width()&&f.width(3*h+100),f.append(g.clone().addClass(c.tickerClone)),f.append(g.clone().addClass(c.tickerClone));var o=b.find(c.content);o.width(h),j=o.first(),c.callbacks.onLoad(j,a(this));var p=function(a){f.append(k);var a="undefined"==typeof a?0:a;k.css("margin-left",a),c.callbacks.beforeAnimation(k,j),b.data("stop",!1);var d=j.animate({"margin-left":-h},{easing:"linear",duration:c.core._getTime(h),complete:function(){k=j,j=j.next(),c.callbacks.completeAnimation(k,j),p.call(b)}});b.data("animation",d)};p.call(this),b[0].pauseTicker=function(){b.each(function(){var a=b.data("animation"),d=b.data("stop");!d&&a&&(a.stop(),b.data("stop",!0),c.callbacks.isPaused())})},b[0].startTicker=function(){b.each(function(){b.data("stop")&&(p(b),b.data("stop",!1),c.callbacks.isResumed())})}}),this},a.fn.newsTickerPause=function(){a(this).each(function(){"pauseTicker"in a(this)[0]&&a(this)[0].pauseTicker()})},a.fn.newsTickerResume=function(){a(this).each(function(){"startTicker"in a(this)[0]&&a(this)[0].startTicker()})}}(jQuery); \ No newline at end of file