You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: demo/javascripts/vendor/jquery.tabslet.min.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
/**
2
-
* Tabslet jQuery plugin
2
+
* Tabslet | tabs jQuery plugin
3
3
*
4
4
* @copyright Copyright 2012, Dimitris Krestos
5
5
* @license Apache License, Version 2.0 (http://www.opensource.org/licenses/apache2.0.php)
6
-
* @link http://vdw.staytuned.gr
6
+
* @linkhttp://vdw.staytuned.gr
7
7
* @version v1.4.2
8
8
*/
9
9
@@ -22,4 +22,4 @@
22
22
23
23
*/
24
24
25
-
(function($,window,undefined){$.fn.tabslet=function(options){vardefaults={mouseevent:"click",attribute:"href",animation:false,autorotate:false,pauseonhover:true,delay:2000,active:1,controls:{prev:".prev",next:".next"}};varoptions=$.extend(defaults,options);returnthis.each(function(){var$this=$(this);options.mouseevent=$this.data("mouseevent")||options.mouseevent;options.attribute=$this.data("attribute")||options.attribute;options.animation=$this.data("animation")||options.animation;options.autorotate=$this.data("autorotate")||options.autorotate;options.pauseonhover=$this.data("pauseonhover")||options.pauseonhover;options.delay=$this.data("delay")||options.delay;options.active=$this.data("active")||options.active;$this.find("> div").hide();$this.find("> div").eq(options.active-1).show();$this.find("> ul li").eq(options.active-1).addClass("active");varfn=eval(function(){$(this).trigger("_before");$this.find("> ul li").removeClass("active");$(this).addClass("active");$this.find("> div").hide();varcurrentTab=$(this).find("a").attr(options.attribute);if(options.animation){$this.find(currentTab).animate({opacity:"show"},"slow",function(){$(this).trigger("_after")})}else{$this.find(currentTab).show();$(this).trigger("_after")}returnfalse});varinit=eval("$this.find('> ul li')."+options.mouseevent+"(fn)");init;varelements=$this.find("> ul li"),i=options.active-1;functionforward(){i=++i%elements.length;options.mouseevent=="hover"?elements.eq(i).trigger("mouseover"):elements.eq(i).click();vart=setTimeout(forward,options.delay);$this.mouseover(function(){if(options.pauseonhover){clearTimeout(t)}})}if(options.autorotate){setTimeout(forward,0);if(options.pauseonhover){$this.on("mouseleave",function(){setTimeout(forward,1000)})}}functionmove(direction){if(direction=="forward"){i=++i%elements.length}if(direction=="backward"){i=--i%elements.length}elements.eq(i).click()}$this.find(options.controls.next).click(function(){move("forward")});$this.find(options.controls.prev).click(function(){move("backward")});$this.on("destroy",function(){$(this).removeData()})})};$(document).ready(function(){$('[data-toggle="tabslet"]').tabslet()})})(jQuery);
25
+
(function($,window,undefined){"use strict";$.fn.tabslet=function(options){vardefaults={mouseevent:"click",attribute:"href",animation:false,autorotate:false,pauseonhover:true,delay:2e3,active:1,controls:{prev:".prev",next:".next"}};varoptions=$.extend(defaults,options);returnthis.each(function(){var$this=$(this);if(!$this.data("tabslet-init")){$this.data("tabslet-init",true);options.mouseevent=$this.data("mouseevent")||options.mouseevent;options.attribute=$this.data("attribute")||options.attribute;options.animation=$this.data("animation")||options.animation;options.autorotate=$this.data("autorotate")||options.autorotate;options.pauseonhover=$this.data("pauseonhover")||options.pauseonhover;options.delay=$this.data("delay")||options.delay;options.active=$this.data("active")||options.active;$this.find("> div").hide();$this.find("> div").eq(options.active-1).show();$this.find("> ul li").eq(options.active-1).addClass("active");varfn=eval(function(){$(this).trigger("_before");$this.find("> ul li").removeClass("active");$(this).addClass("active");$this.find("> div").hide();vare=$(this).find("a").attr(options.attribute);if(options.animation){$this.find(e).animate({opacity:"show"},"slow",function(){$(this).trigger("_after")})}else{$this.find(e).show();$(this).trigger("_after")}returnfalse});varinit=eval("$this.find('> ul li')."+options.mouseevent+"(fn)");init;varelements=$this.find("> ul li"),i=options.active-1;varforward=function(){i=++i%elements.length;options.mouseevent=="hover"?elements.eq(i).trigger("mouseover"):elements.eq(i).click();vare=setTimeout(forward,options.delay);$this.mouseover(function(){if(options.pauseonhover)clearTimeout(e)})};if(options.autorotate){setTimeout(forward,0);if(options.pauseonhover)$this.on("mouseleave",function(){setTimeout(forward,1e3)})}varmove=function(e){if(e=="forward")i=++i%elements.length;if(e=="backward")i=--i%elements.length;elements.eq(i).click()};$this.find(options.controls.next).click(function(){move("forward")});$this.find(options.controls.prev).click(function(){move("backward")});$this.on("destroy",function(){$(this).removeData()})}})};$(document).ready(function(){$('[data-toggle="tabslet"]').tabslet()})})(jQuery)
0 commit comments