2011-08-17 21:37:35 -04:00
|
|
|
/*
|
2012-01-26 00:27:50 -05:00
|
|
|
* Skeleton V1.1
|
2011-08-17 21:37:35 -04:00
|
|
|
* Copyright 2011, Dave Gamache
|
|
|
|
* www.getskeleton.com
|
|
|
|
* Free to use under the MIT license.
|
|
|
|
* http://www.opensource.org/licenses/mit-license.php
|
2011-08-18 00:58:20 -04:00
|
|
|
* 8/17/2011
|
2011-08-17 21:37:35 -04:00
|
|
|
*/
|
|
|
|
|
2011-08-18 01:11:39 -04:00
|
|
|
|
2012-01-25 23:51:32 -05:00
|
|
|
$('body').delegate('ul.tabs > li > a', 'click', function(e) {
|
2011-08-17 21:37:35 -04:00
|
|
|
|
2012-01-25 23:51:32 -05:00
|
|
|
//Get Location of tab's content
|
|
|
|
var contentLocation = $(this).attr('href');
|
2011-08-18 01:11:39 -04:00
|
|
|
|
2012-01-25 23:51:32 -05:00
|
|
|
//Let go if not a hashed one
|
|
|
|
if(contentLocation.charAt(0)=="#") {
|
2011-08-18 01:11:39 -04:00
|
|
|
|
2012-01-25 23:51:32 -05:00
|
|
|
e.preventDefault();
|
2011-08-18 01:11:39 -04:00
|
|
|
|
2012-01-25 23:51:32 -05:00
|
|
|
//Make Tab Active
|
|
|
|
$(this).parent().siblings().children('a').removeClass('active');
|
|
|
|
$(this).addClass('active');
|
2011-08-18 01:11:39 -04:00
|
|
|
|
2012-01-25 23:51:32 -05:00
|
|
|
//Show Tab Content & add active class
|
|
|
|
$(contentLocation).show().addClass('active').siblings().hide().removeClass('active');
|
2011-08-18 01:11:39 -04:00
|
|
|
|
2012-01-25 23:51:32 -05:00
|
|
|
}
|
2011-08-17 21:37:35 -04:00
|
|
|
});
|