Bones/javascripts/app.js

40 lines
744 B
JavaScript
Raw Normal View History

/*
* Skeleton V1.0
* Created by Dave Gamache
* www.getskeleton.com
* 5/15/2011
*/
$(document).ready(function() {
/* Tabs Activiation
================================================== */
2011-05-16 21:03:36 -04:00
var tabs = $('ul.tabs'),
tabsContent = $('ul.tabs-content');
tabs.each(function(i) {
//Get all tabs
2011-05-17 19:28:03 -04:00
var tab = $(this).find('a');
tab.click(function(e) {
//Get Location of tab's content
2011-05-17 19:28:03 -04:00
var contentLocation = this.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
2011-05-17 19:28:03 -04:00
$(contentLocation).show().siblings().hide();
}
});
});
});