Log in

View Full Version : column headings added to AnyLink Drop Down Menu v2.0



mcarey101
08-03-2009, 11:48 PM
1) Script Title:
AnyLink Drop Down Menu v2.0
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm
3) Describe problem:
i liked this new version of the script because you can put all the menu details in the JS file and not inline with the code. But I wanted the ability to use column headings with the multi-column feature.

I modified the code to accomplish this- if you are interested in this, here is the modified section of code in anylinkmenu.js- very simple- just added the 3 lines (if, frag+= and else). Then you use the 3rd parameter of hdr and poof- the entry does not have a link attached to it. You can style it by adding a css style to the anylinkmenu.css file like this:

.menu-col-hdr{
font: bold 12px Verdana;
text-decoration: underline;
color:black;
}


here is the modified JS code.
getmenuHTML:function(menuobj){
var menucontent=[]
var frag=""
for (var i=0; i<menuobj.items.length; i++){
if (menuobj.items[i][2]=="hdr")
frag+='<li class=menu-col-hdr>' + menuobj.items[i][0] + '</li>\n'
else
frag+='<li><a href="' + menuobj.items[i][1] + '" target="' + menuobj.linktarget + '">' + menuobj.items[i][0] + '</a></li>\n'


if you like it, let me know. if you REALLY like it, you can send me a paypal donation of $3 !