Skip to content

Commit

Permalink
close drawer when menu links are clicked and prepare form before opening
Browse files Browse the repository at this point in the history
  • Loading branch information
jasoncalabrese committed Sep 13, 2015
1 parent e86c61f commit 111913d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/client/browser-utils.js
Expand Up @@ -37,6 +37,10 @@ function init ($) {
event.preventDefault();
});

$('.navigation a').click(function navigationClick ( ) {
closeDrawer('#drawer');
});

function reload() {
//strip '#' so form submission does not fail
var url = window.location.href;
Expand Down Expand Up @@ -80,9 +84,8 @@ function init ($) {

closeOpenDraw(function () {
lastOpenedDrawer = id;
$(id).css('display', 'block').animate({right: '0'}, 300, function () {
if (callback) { callback(); }
});
if (callback) { callback(); }
$(id).css('display', 'block').animate({right: '0'}, 300);
});

}
Expand Down

0 comments on commit 111913d

Please sign in to comment.