Skip to content

Instantly share code, notes, and snippets.

@joetower
Created June 6, 2014 01:32
Show Gist options
  • Save joetower/0fddfe4ddb8ee52ad2a6 to your computer and use it in GitHub Desktop.
Save joetower/0fddfe4ddb8ee52ad2a6 to your computer and use it in GitHub Desktop.
jQuery n00bness
// Small handheld collpased navigation
(function ($) {
'use strict';
$(document).ready(function () {
var pullNav = $('#pull-nav');
var menu = $('.secondary-links');
var pullSideMenu = $('#pull-side-one');
var menuSidebar = $('#sidebar-left');
var pullSideResources = $('#pull-side-two');
var menuSidebarTwo = $('#sidebar-left2');
var pullSearch = $('#pull-search');
var search = $('#header-region');
$(pullNav).click(function () {
$(this).toggleClass("active");
$(menu).toggle();
return false;
});
$(pullSideMenu).click(function () {
$(this).toggleClass("active");
$(menuSidebar).toggle();
return false;
});
$(pullSideResources).click(function () {
$(this).toggleClass("active");
$(menuSidebarTwo).toggle();
return false;
});
$(pullSearch).click(function () {
$(this).toggleClass("active");
$(search).toggle();
return false;
});
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment