A
A
APP-app2014-08-04 08:19:49
JavaScript
APP-app, 2014-08-04 08:19:49

How to make toogle menu?

I have a dropdown, hiding menu and it works, but when you launch it on iphone, on the fifth click in this menu, the application crashes to a black screen, it works fine in the browser.
Here is my code:

toggleMenu: function() {
        if (menuOpened) {
            $('home-menu').setStyle('-webkit-transform', 'translateX(-50px)');
            menuOpened = false;
        }
        else {
            $('home-menu').setStyle('-webkit-transform', 'translateX(0px)');
            menuOpened = true;
        }
    },
    onBackButtonTap: function() {
        currThis = this;
        this.backButton.element.addClass('selected');
        setTimeout(function() {
            currThis.getViewControllerStack().popViewController()
        }, 1000);
    }
});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question