3 * Copyright 2011, Dave Gamache
5 * Free to use under the MIT license.
6 * http://www.opensource.org/licenses/mit-license.php
11 $(document).ready(function() {
14 ================================================== */
16 var tabs = $('ul.tabs');
18 tabs.each(function(i) {
21 var tab = $(this).find('> li > a');
22 tab.click(function(e) {
24 //Get Location of tab's content
25 var contentLocation = $(this).attr('href');
27 //Let go if not a hashed one
28 if(contentLocation.charAt(0)=="#") {
33 tab.removeClass('active');
34 $(this).addClass('active');
36 //Show Tab Content & add active class
37 $(contentLocation).show().addClass('active').siblings().hide().removeClass('active');