Bones/javascripts/app.js
2011-05-16 18:03:36 -07:00

41 lines
826 B
JavaScript

/*
* Skeleton V1.0
* Created by Dave Gamache
* www.getskeleton.com
* 5/15/2011
*/
$(document).ready(function() {
/* Tabs Activiation
================================================== */
var tabs = $('ul.tabs'),
tabsContent = $('ul.tabs-content');
tabs.each(function(i) {
//Get all tabs
var tab = $(this).children('li').children('a');
tab.click(function(e) {
//Get Location of tab's content
var contentLocation = $(this).attr("href") + "Tab";
//Let go if not a hashed one
if(contentLocation.charAt(0)=="#") {
e.preventDefault();
//Make Tab Active
tab.removeClass('active');
$(this).addClass('active');
//Show Tab Content
$(contentLocation).parent('.tabs-content').children('li').hide();
$(contentLocation).show();
}
});
});
});