Add Javascript to Nav Menu?
-
Is there a way to put javascript in the URL portion of a WordPress menu item? I have a live chat function on my site, and I am supposed to put this code onto the site to make a link to open the live chat (as suggested here).
<!-- BEGIN OLARK CHAT LINK --> <a href="javascript:void(0);" onclick="olark('api.box.expand')"> Click here to chat! </a> <!-- END OLARK CHAT LINK -->
The client wants the link in the utility nav bar, which was created used a WordPress menu in the WordPress dashboard. But when I copy and paste
javascript:void(0);" onclick="olark('api.box.expand')
into the URL box in the WordPress dashboard, it just disappears and the link remains inactive.Any ideas on how to achieve this would be most welcome.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Add Javascript to Nav Menu?’ is closed to new replies.