How to stop JavaScript from running automatically?

If I am not mistaken, you don’t want your script to start the Animation automatically on pageload.

So you simply have to remove the lase line from the code:

setTimeout(function() { toggleOptions('.selector'); }, 100);

This way, the animation is only started when you manually click on .selector button.

Browse More Popular Posts

Leave a Comment