By lucasvm on
Hello
I need to add onclick event on a menu item button, when user click on the menu button i need to show a popup, how can i detect the onclick event in a menu item?????????'
Any ideas?
Hello
I need to add onclick event on a menu item button, when user click on the menu button i need to show a popup, how can i detect the onclick event in a menu item?????????'
Any ideas?
Comments
This is straightfoward
This is straightfoward JS/jQuery. You just need to identify the menu button with a class or ID. Then you can attach the onclick event. Should be something like this:
where should i need to add
where should i need to add this code? in witch file?
You need to add it to a
You need to add it to a javascript file. Depending on the theme you're using, it can vary where this file will be located. Usually it's called "script.js" and it's located in the theme's folder.
The code isn't complete, though. You'll still need to write the code to show the popup.