Skip to content

Commit

Permalink
Merge branch 'sidenav/callbacks' of https://github.com/DonHartman/mat…
Browse files Browse the repository at this point in the history
…erialize into DonHartman-sidenav/callbacks
  • Loading branch information
acburst committed May 30, 2017
2 parents 04b4e60 + f9b9c3c commit 8a01666
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions js/sideNav.js
Expand Up @@ -6,7 +6,9 @@
menuWidth: 300,
edge: 'left',
closeOnClick: false,
draggable: true
draggable: true,
onOpen: null,
onClose: null
};
options = $.extend(defaults, options);

Expand Down Expand Up @@ -135,7 +137,10 @@
}
});
}
};
if(typeof(options.onClose) === 'function'){
options.onClose();
}
}



Expand Down Expand Up @@ -332,15 +337,18 @@
$(this).remove();
} });

});
$('body').append($overlay);
$overlay.velocity({opacity: 1}, {duration: 300, queue: false, easing: 'easeOutQuad',
complete: function () {
menuOut = true;
panning = false;
}
});
}
});
$('body').append($overlay);
$overlay.velocity({opacity: 1}, {duration: 300, queue: false, easing: 'easeOutQuad',
complete: function () {
menuOut = true;
panning = false;
}
});
if(typeof(options.onOpen) === 'function'){
options.onOpen();
}
}

return false;
});
Expand Down

0 comments on commit 8a01666

Please sign in to comment.