Recent Questions
Q: Im working on a menu with your program, and am unable to make the javascript sticky menu save the hover states after you move off the navigation item and onto its child nav items.
For example
Example Nav item 1
-Example Sub Nav item 1
-Example Sub Nav item 2
-Example Sub Nav item 3
When I hover on the Example Nav Item 1, the hover state works, but when I move my mouse down (Im using a horizontal javascript sticky menu) to select Example Sub Nav item 1, I want the hover state to stay selected on the "parent" Nav Item. Is this possible? What is the variable you have to change to accomplish this?
A: Yes, it's possible, please use
var saveNavigationPath = 1; The javascript sticky menu keeps items highlighted during menu navigation.
0 - disabled, 1 - enabled (default).
Q: Could you please help me with coding of the submenu box in your java script dropdown menu?
I hope you can see images I've included in this email.
I want to put a large block of text in the submenu.
Now I can do it like the code shown here and it wraps and works OK.
["Text display","", "", "", "", "", "0", "0", "", ],
["|Text Line 1 Text Line 1Text Line 1Text Line 1<br>text Line 2text Line 2text Line 2text Line 2<br>Text line 3Text line 3Text line 3Text line 3<br>text line 4text line 4text line 4text line 4text line 4", "", "", "", "", "", "", "0"],
];
The problem is that if I want a large amount of text, the line of code with text in it will be 10 miles long. Please note the line of code above isn't broken in practice. The email wraps it.
Is there any way to break the code into lines instead of one very long line?
For example:
["Text display","", "", "", "", "", "0", "0", "", ],
["|Text Line 1 Text Line 1Text Line 1Text Line 1<br>
Line 2text Line 2text Line 2text Line 2<br>
Text line 3Text line 3Text line 3Text line 3<br>
text line 4text line 4text line 4text line 4text line 4", "", "", "", "", "", "", "0"],
];
No matter what way I try It won't work
Is there a way?
A: The only way to do that is
["|Text Line 1 Text Line 1Text Line 1Text Line 1<br>"+
"Line 2text Line 2text Line 2text Line 2<br>"+
"Text line 3Text line 3Text line 3Text line 3<br>"+
"text line 4text line 4text line 4text line 4text line 4", "", "", "", "", "", "", "0"],
];
Q: What I would like to see is the ability to have a base site navigation menu with all the definitional entries (size, locations, icons, etc.) defined but all the menuitems be called from an Ajax file.
A: You cannot use ajax submenus for the top items.
But you can use several .js file, for example:
params.js //file with all menu parameters (size, locations, icons, etc.)
all code before
var menuItems = [
...
];
dm_init();
data_ajax1.js //data files for ajax submenus
data_ajax2.js
data_ajax3.js
...
main_data.js - data file with the following code:
var menuItems = [
["Item 1","", "", "", "", "", "0", "0", "data_ajax1.js", "", "", ],
["Item 2","", "", "", "", "", "0", "0", "data_ajax2.js", "", "", ],
["Item 3","", "", "", "", "", "0", "0", "data_ajax3.js", "", "", ],
["Item 4","", "", "", "", "", "0", "0", "data_ajax4.js", "", "", ],
];
dm_init();
You can also place this code into your html page directly (in the place where you want tohave a menu):
<script type="text/javascript">
var menuItems = [
["Item 1","", "", "", "", "", "0", "0", "data_ajax1.js", "", "", ],
["Item 2","", "", "", "", "", "0", "0", "data_ajax2.js", "", "", ],
["Item 3","", "", "", "", "", "0", "0", "data_ajax3.js", "", "", ],
["Item 4","", "", "", "", "", "0", "0", "data_ajax4.js", "", "", ],
];
dm_init();
Q: Please let us know how to select the font and background colors using the hexidecimal number?
We have another website and want to use the exact same color scheme.
We want to enter the number such as FF8080.
Hopefully, we can enter the hex numbers into this program.
A: You should write, for example, so:
var menuBackColor = "#FF8080";
var menuBorderColor = "#FF8080";
var itemBackColor = ["#FF8080","#FF8080"];
var itemBorderColor = ["#FF8080","#FF8080"];
var fontColor = ["#000000","#FFFFFF"];