Bones/javascripts/app.js

43 lines
853 B
JavaScript
Raw Normal View History

2011-07-31 15:03:09 -04:00
/*
* Skeleton V1.0.3
* Copyright 2011, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 7/17/2011
2011-07-31 15:03:09 -04:00
*/
$(document).ready(function() {
/* Tabs Activiation
================================================== */
var tabs = $('ul.tabs');
2011-07-31 15:03:09 -04:00
tabs.each(function(i) {
//Get all tabs
var tab = $(this).find('> li > a');
tab.click(function(e) {
2011-07-31 15:03:09 -04:00
//Get Location of tab's content
var contentLocation = $(this).attr('href') + "Tab";
2011-07-31 15:03:09 -04:00
//Let go if not a hashed one
if(contentLocation.charAt(0)=="#") {
2011-07-31 15:03:09 -04:00
e.preventDefault();
2011-07-31 15:03:09 -04:00
//Make Tab Active
tab.removeClass('active');
$(this).addClass('active');
2011-07-31 15:03:09 -04:00
//Show Tab Content & add active class
$(contentLocation).show().addClass('active').siblings().hide().removeClass('active');
2011-07-31 15:03:09 -04:00
}
});
2011-07-31 15:03:09 -04:00
});
});