Check out this relevant JSFiddle link: http://jsfiddle.net/7u2fy/
I tried creating a slide-in menu that would appear when a button is clicked and disappear when the escape key is pressed or when anywhere outside of the menu is clicked. I also wanted to darken the background behind the menu when it is active.
The issue I'm facing is that the jQuery click handler doesn't seem to be working for closing the menu.
Although the appearance of the jsfiddle may seem odd, in my actual project it looks fine and functions correctly, except for the jQuery click handler not working.
The specific code causing problems is...
$('#site-wrapper.show-nav #site-canvas').click(function () {
toggleNav();
});