var ssOffCanvas = function() {
var menuTrigger = $('#header-menu-trigger'),
nav = $('#menu-nav-wrap'),
closeButton = nav.find('.close-button'),
siteBody = $('body'),
mainContents = $('section, footer');
// open-close menu by clicking on the menu icon
menuTrigger.on('click', function(e){
e.preventDefault();
menuTrigger.toggleClass('is-clicked');
siteBody.toggleClass('menu-is-open');
});
};
proj_request_menu.onclick = function() {
modal.style.display = "block";
};
What it the most suitable way to call ssOffCanvas
object menuTrigger
in proj_request_menu function. I know to handle this within the object.
Ex: menuTrigger.trigger('click');
Need your help ...
menuTrigger
fromssOffCanvas
in order to access it outside the function.