We need to check if there was a click on the $ element ('menu'). then the function should not work. Any ideas?

    1 answer 1

    • we get a boolean variable, for example var isMenuClicked = false;
    • hang the listener of the click event on the item
    • when clicking we do isMenuClicked = true
    • at the beginning of the monitored function, write if (isMenuClicked) return;
    • everything
    • Thank you very much! Happy New Year! - Vladimir Vladimirovich