After much help and more headache, I finally ironed out the GIF toggle button I was working on
I know there's a few scripts for this around already, but ngl, I was STRUGGLING to get any of those to work, so I figured another one wouldn't hurt to have floating around.
The button:
- has 2 classes of images coded in; one class toggles between display:none/display:inline-block, the other toggles between blurred/unblurred
- also has 2 classes for the button that change on click, so hide/show can have different looks easily
- switches the text on click in a very simple way, keeping your HTML from getting messy and confusing (im easily confused, can you tell
)
Please let me know if you see any improvements to add, otherwise I hope some people find it useful~
You can find it on codepen here!