2011-07-31 15:03:09 -04:00
|
|
|
/*
|
2011-07-17 15:28:18 -04:00
|
|
|
* Skeleton V1.0.3
|
2011-05-19 15:05:30 -04:00
|
|
|
* Copyright 2011, Dave Gamache
|
2011-05-15 20:02:52 -04:00
|
|
|
* www.getskeleton.com
|
2011-05-19 15:05:30 -04:00
|
|
|
* Free to use under the MIT license.
|
|
|
|
* http://www.opensource.org/licenses/mit-license.php
|
2011-07-17 15:28:18 -04:00
|
|
|
* 7/17/2011
|
2011-07-31 15:03:09 -04:00
|
|
|
*/
|
|
|
|
|
2011-05-02 15:17:18 -04:00
|
|
|
|
2011-05-01 11:43:13 -04:00
|
|
|
$(document).ready(function() {
|
|
|
|
|
2011-07-17 15:28:18 -04:00
|
|
|
|
2011-05-03 10:36:26 -04:00
|
|
|
/* Tabs Activiation
|
|
|
|
================================================== */
|
2011-06-08 08:42:36 -04:00
|
|
|
var tabs = $('ul.tabs');
|
2011-07-31 15:03:09 -04:00
|
|
|
|
2011-05-01 11:43:13 -04:00
|
|
|
tabs.each(function(i) {
|
|
|
|
//Get all tabs
|
2011-05-17 20:54:18 -04:00
|
|
|
var tab = $(this).find('> li > a');
|
2011-05-01 11:43:13 -04:00
|
|
|
tab.click(function(e) {
|
2011-07-31 15:03:09 -04:00
|
|
|
|
2011-05-01 11:43:13 -04:00
|
|
|
//Get Location of tab's content
|
2011-05-17 20:54:18 -04:00
|
|
|
var contentLocation = $(this).attr('href') + "Tab";
|
2011-07-31 15:03:09 -04:00
|
|
|
|
2011-05-01 11:43:13 -04:00
|
|
|
//Let go if not a hashed one
|
|
|
|
if(contentLocation.charAt(0)=="#") {
|
2011-07-31 15:03:09 -04:00
|
|
|
|
2011-05-01 11:43:13 -04:00
|
|
|
e.preventDefault();
|
2011-07-31 15:03:09 -04:00
|
|
|
|
2011-05-01 11:43:13 -04:00
|
|
|
//Make Tab Active
|
|
|
|
tab.removeClass('active');
|
|
|
|
$(this).addClass('active');
|
2011-07-31 15:03:09 -04:00
|
|
|
|
2011-06-08 08:42:36 -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-05-01 11:43:13 -04:00
|
|
|
});
|
2011-07-31 15:03:09 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|