I had written the following jQuery code. It's working fine on my website, but fails in the generated style guide. The init function is called successfully, but if I'm clicking on the .menu__btn, the script doesn't call the toggle function. Is there anything wrong with my script for hologram?
var Menu = (function() {
var $menuBtn = $('.menu__btn'),
$menuPopupGlobal = $('.menu__popup');
var init = function() {
// Toggle Menu Popup
$menuBtn.on('click', toggle);
console.log('Menu init');
};
var toggle = function(e) {
console.log('Menu Toggle');
// ...
};
return {
init: init
};
})();
$(document).ready( Menu.init );
Hi guys,
I had written the following jQuery code. It's working fine on my website, but fails in the generated style guide. The
init function
is called successfully, but if I'm clicking on the.menu__btn
, the script doesn't call thetoggle
function. Is there anything wrong with my script for hologram?