[ad_1]
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.
[ad_2]
solved How to stop JavaScript from running automatically?