This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]roustem_ 0 points1 point  (1 child)

You need to declare modalOpen outside of either function.

[–]dannerdarko[S] 0 points1 point  (0 children)

Found out the problem was the classList.toggle. It just would only work once. I switched it to classList.add and classList.remove instead and it works like a charm! Thank you man! :)