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


 

    How to call javascript function when the user click on a menu bar html Items

Return to Recent Questions


Q: Very interested by your product, I want to know, before buy, if I can call javascript function when the user click on a menu Items;

you have this example, but I want the possibility to call a javascript function in the client side :

var menuItems = [
[text, "javascript:alert('Hello, world!')", icon1, icon2],
];

Is it possible, if yes could you give the sample, because Milovic menu have a javascript:function call, what about your product ?

Thank you for the answer.


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"]
];

Unfortunately we don't have such example.





Return to Recent Questions

Magical HTML Bootstrap Slider With Text Templates Prime Simple Website Builder Review  |  Awesome Mobile-friendly Website Design Review  |  Exceptional Bootstrap Mobile Template Set  |  How to Make a Webpage - Step by Step Tutorial  |  Fine Bootstrap Page Templates - Video List  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. Best AI Website Builder | Free AI Website Builder | AI Website Generator | Website Generator AI | AI web design generator