Archived topic
Using on-click event links in sitewide nav
1 reply · Started by Gary on June 6, 2022
Viewing posts 1–2 of 2
Hi,
I'm looking to make some links in my header and footer onclick events rather than traditional links. Is there a way to do this? The links will be a mixture of text and button links.
Thanks in advance!
Hi there,
i would write an eventListener for the onclick event. Theres a good article on them here:
https://flaviocopes.com/how-to-add-event-listener-multiple-elements-javascript/
This archived topic is closed to new replies.