Recent Questions Jquery Treeview Control Expand Method
Q: I have a question that I cannot find in your FAQ section about your Javascript/DHTML Tree Menu.
Bought the whole set a few days ago and is very happy about it, I am uzzled & frustrated about one thing now though.
- = Link
+ = Link with subCat.
I have a menu that looks something like this:
- Home
+ Our products
+ FAQ
+ Stores
- Contact
+ Wholeseller
+ About us
Now every link here has a icon/s to the right that shows if the category is folded up or not. Trouble is that so has the - Home and - Contact that DON'T have any subitems! How to create dhtml menu so those two tree items won't get the rightsided icons?
The frustrating/confusing thing is if I place - Home or - Contact into lets say + Our products, the right side icon goes away and there it looks as I want it. But I NEED it to look this way in the top section.
A: You have icons in the top items on the right side in XP-style only.
You can set the following parameter to turn off XP-style:
var tXPStyle=0;
Q: I am trying to create a multicolumn dhtml navigation menu and nothing appears when I upload it to my server. I am attaching my menu called menu.js that I have created and placed in a folder called menudir.
Can you please advise, thank you.
A: You can find more info here:
http://www.deluxe-menu.com/highlighted-items-sample.html
JavaScript Tree Menu has only two states normal and mouseover.
Try to do the following things:
- delete var pressedItem=1; parameter from your data file
- set correct parameter on each page before you call data file, forexample:
<noscript><a href="http://deluxe-menu.com">dhtml navigation menu by Deluxe-Menu.com</a></noscript>
<script type="text/javascript"> var dmWorkPath = "menudir/";</script>
<script type="text/javascript" src="menudir/dmenu.js"></script>
<script type="text/javascript"> var pressedItem=3;</script>
...
<script type="text/javascript" src="menudir/data.js"></script>
You can also set a pressed item using Javascript API:
function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)
Sets a current pressed item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
recursion = true/false - highlight parent items.
But notice, to use dm_ext_setPressedItem() you should know ID of selected item and subitem. You can't get this ID after you reload your page. That is why you should write your own code on PHP.Q: I appreciate your assistance with this problem. I am 98% of the way happy with this product. When I made the changes you suggested, the copyright error went away, however the site no longer validates. It does not like the <noscript> tags. Is there a fix for this?
A: Matt, you can move your <noscript> tag into the <body> tag.
Try that.
Q: For some reason all of the menu items are squished together when I put the js code in my page.
Is my site's CSS overriding the ones set in the menu css? If so how do I get around this?
A: See, the problem is that the script can't get css properties of the object if they are described in separate .css block (or file).
To get the value you should move .css style into style="" attribute.
Please, try to add your
css file -> inline css