(c) 2016, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
  Support
  FAQ
  Contacts
  About Us
  Recent Questions


 

    I would like to add a javascript link with onclick event to the html jump menu

Return to Recent Questions


Q: I would like to add a javascript link but cannot seem to get it handle the event as a tag or onclick event. I just want to grab the current page, insert it into a string, and go off to the page it specifies. Can this be done?


A: You're able to use Javascript for each item, for example:

var menuitems = [
["item text", "javascript:your_code_here"]
];

Unfortunately, you can't assign onmouseover/onClick event to each item.
However, you can achieve this by using standard html objects within items, for example:

var menuitems = [
["<div onClick='your_code_here'>item text</div>", "index.html"]
];





Return to Recent Questions

Responsive Site Theme Mobile Page Layouts Overview  |  Bootstrap Site Themes Review  |  Mobile-friendly Page Maker  |  36 Top Eye-catching and Free AMP Elements Templates for 2021  |  Responsive Website Maker  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. Free AI Website Builder | AI Website Generator | AI Website Builder | AI Website Generator | AI website design generator