Adding Onclick Event to 3.x Menus for AJAX
-
Greetings! I am hoping to achieve the following:
- Automagically add an “onclick” event to menu links created by the WordPress 3.x Menu system.
- These “onclick” events will trigger a jQuery AJAX function in where the content in my #container (or even better HTML5 “article”) will be replaced with the corresponding menu content.
I’ve seen a couple of plugins that provide similar functionality, but haven’t been maintained in a while. But frankly, I’d rather learn to fish than be fed.
And, finally, ideally I’ll be able to keep the “href” property unaltered for SEO purposes.
- The topic ‘Adding Onclick Event to 3.x Menus for AJAX’ is closed to new replies.