Skip to content

Instantly share code, notes, and snippets.

@malihu
malihu / tabs.js
Created October 1, 2012 14:49
Fully commented code for the tabs.js script
(function($){
$.fn.Tabs=function(speed){ /* tabs transition speed parameter */
return this.each(function(){
/* define/cache variables */
var tabs=$(this),
tabsLabels=tabs.children("ul"),
tabLabel=tabsLabels.find("a"),
tabsContent=tabs.children("div"),
tabLink,
tabsLoader=tabsContent.children(".ajax-loader"); /* define ajax loader element */