Sha256: 45f3aa0654c9129c34c95d3ee5d018f62b4d5d5413881c3f2bf285fa28906106
Contents?: true
Size: 1.95 KB
Versions: 3
Compression:
Stored size: 1.95 KB
Contents
$(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).show(); } $('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 + '"]')); } /* ALERT BOXES ------------ */ $(".alert-box").delegate("a.close", "click", function(event) { event.preventDefault(); $(this).closest(".alert-box").fadeOut(function(event){ $(this).remove(); }); }); /* PLACEHOLDER FOR FORMS ------------- */ /* Remove this and jquery.placeholder.min.js if you don't need :) */ $('input, textarea').placeholder(); /* UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE6/7/8 SUPPORT AND ARE USING .block-grids */ // $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'left'}); // $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'left'}); // $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'left'}); // $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'left'}); /* DROPDOWN NAV ------------- */ var lockNavBar = false; $('.nav-bar a.flyout-toggle').live('click', function(e) { e.preventDefault(); var flyout = $(this).siblings('.flyout'); if (lockNavBar === false) { $('.nav-bar .flyout').not(flyout).slideUp(500); flyout.slideToggle(500, function(){ lockNavBar = false; }); } lockNavBar = true; }); /* DISABLED BUTTONS ------------- */ /* Gives elements with a class of 'disabled' a return: false; */ });
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ZURB-foundation-2.1.5.2 | templates/project/javascripts/app.js |
ZURB-foundation-2.1.5.1 | templates/project/javascripts/app.js |
ZURB-foundation-2.1.5 | templates/project/javascripts/app.js |