How to cancel trigger after click
<p>On my website, I have a closed accordion menu (menu-1). If the user doesn't click on the menu for the first 5 seconds of being on the site, the menu drops down automatically using this js code:</p>

<pre><code>setTimeout(function () {
    $('#menu-1').trigger('click');
}, 5000);
</code></pre>

<p>My problem is when the user doesn't wait 5 seconds, and clicks on the menu before the trigger, the trigger still goes off and ends up closing the menu. How do make it so that the trigger is canceled if the user clicks on the menu before its triggered?</p>