The code should open a modal window after a click on the button but the first time you want to open it, it requires two clicks on the button to open it. I encoutered this problem after copying some code from W3Schools and modifying it so it fits inside my JS file. The code should open a modal window after a cli