/* Foundation v2.2 http://foundation.zurb.com */ jQuery(document).ready(function ($) { /* Use this js doc for all application specific JS */ /* TABS --------------------------------- */ /* Remove if you don't need :) */ function activateTab($tab) { var $activeTab = $tab.closest('dl').find('a.active'), contentLocation = $tab.attr("href") + 'Tab'; //Make Tab Active $activeTab.removeClass('active'); $tab.addClass('active'); //Show Tab Content $(contentLocation).closest('.tabs-content').children('li').hide(); $(contentLocation).css('display', 'block'); } $('dl.tabs').each(function () { //Get all tabs var tabs = $(this).children('dd').children('a'); tabs.click(function (e) { activateTab($(this)); }); }); if (window.location.hash) { activateTab($('a[href="' + window.location.hash + '"]')); } });