Ivan Ivan - 1 year ago 64
CSS Question

jQuery click function fires up on page load

I'v been trying to figure this out on my own and searched up on google but I don't know what the problem is, the click function keeps firing up on page load. Please explain the problem and how to fix it. Thanks.


height: 'toggle'
}, 200

Answer Source

Its not firing on page load. It has to do with your css rather than javascript code. Javascript is working as expected. You need to set menu hidden when the page loads for the first time. Please see this



display:none to .menu-nav

Hope this helps.

Happy Learning


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download