(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 need beforeItemImage or afterItemImage for the top menu in javascript..

Return to Recent Questions


Q: I know. I have two menus on the page and I am not using beforeItemImage or afterItemImage for the top menu in javascript (the one you referenced below), but I need it for the second menu. The parameters for that menu are in mainnav_data.js.

Even when I only call dmWorkPath and dmenu.js once, it does not work.

A: See, it is not correctly to use image-based items:

["","", "mainnav_data.files/corpinfo.gif", "mainnav_data.files/corpinfo2.gif", "", "_self", "0", "", "", "", "", ],

and specify beforeItemImage/afterItemImage parameters. They won't work in that case.

You can create such buttons in the following ways:
1) Use image-based menu (images with text).

Create normal and mouse-over state images (with text) for each item:
["","", "mainnav_data.files/corpinfo.gif", "mainnav_data.files/corpinfo2.gif", "", "_self", "", "", "", "", "", ],
["","", "mainnav_data.files/new.gif", "mainnav_data.files/new2.gif", "", "_self", "", "", "", "", "", ],
["","", "mainnav_data.files/xxxxx.gif", "mainnav_data.files/xxxxx2.gif", "", "_self", "", "", "", "", "", ],


2) Use combined background for the menu in javascript items (images without text).

var beforeItemImage = [,]; //left-side image for normal and mouse over state
var itemBackImage = [,]; //background or image for normal and mouse over state
var afterItemImage = [,]; //right-side image for normal and mouse over state
var beforeItemImageW = '';
var afterItemImageW = '';
var beforeItemImageH = '';
var afterItemImageH ='';

But you should create a small images in any Graph Editor, for example:
button_n_back.gif
button_n_left.gif
button_n_right.gif
button_o_back.gif
button_o_left.gif
button_o_right.gif

You cannot use these two methods together!





Return to Recent Questions

Related:
Bootstrap Input Validation Bootstrap Pagination Responsive  |  Bootstrap Alert Colors  |  Bootstrap Modal Position  |  Bootstrap Buttons Group  |  Bootstrap Table Template  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. AI Website Generator | Free AI Website Generator | AI Website Generator | Website Generator AI | AI web page design generator