Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery Code is not working in hologram example #227

Open
philipisik opened this issue Apr 16, 2015 · 0 comments
Open

jQuery Code is not working in hologram example #227

philipisik opened this issue Apr 16, 2015 · 0 comments

Comments

@philipisik
Copy link

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 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 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant