Results 1 to 3 of 3

Thread: Can I use Images within the drop down - AnyLink JS drop down menu?

  1. #1
    Join Date
    Jan 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Can I use Images within the drop down - AnyLink JS drop down menu?

    1) Script Title: AnyLink JS Drop Down Menu v2.2

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    3) Describe problem:

    I am using anylinkmenu3 with the multiple columns which works perfectly.

    It currently looks like this in the JS file:

    var anylinkmenu3={divclass:'anylinkmenucols', inlinestyle:'', linktarget:'secwin'} //Third menu variable. Same precaution.
    anylinkmenu3.cols={divclass:'column', inlinestyle:''} //menu.cols if defined creates columns of menu links segmented by keyword "efc"
    anylinkmenu3.items=[
    ["Dynamic Drive", "http://www.dynamicdrive.com/"],
    ["CSS Drive", "http://www.cssdrive.com/"],
    ["JavaScript Kit", "http://www.javascriptkit.com/"],
    ["Coding Forums", "http://www.codingforums.com/"],
    ["JavaScript Reference", "http://www.javascriptkit.com/jsref/", "efc"],
    ["CNN", "http://www.cnn.com/"],
    ["MSNBC", "http://www.msnbc.com/"],
    ["Google", "http://www.google.com/"],
    ["BBC News", "http://news.bbc.co.uk", "efc"],
    ["News.com", "http://www.news.com/"],
    ["SlashDot", "http://www.slashdot.com/"],
    ["Digg", "http://www.digg.com/"],
    ["Tech Crunch", "http://techcrunch.com"] //no comma following last entry!
    ]

    Instead of it displaying a list of text (CNN for example, can I insert an image?

    ["<img src="images/1.jpg"/>, "http://www.dynamicdrive.com/"]

    The above stops the drop down working completely.

    Any help would be appreciated.

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,815
    Thanks
    2
    Thanked 425 Times in 419 Posts

    Default

    Code:
    var anylinkmenu2={divclass:'anylinkmenu', inlinestyle:'width:150px; background:#FDD271', linktarget:'_new'} //Second menu variable. Same precaution.
    anylinkmenu2.items=[
    	["<img src='http://www.vicsjavascripts.org.uk/StdImages/Egypt5.jpg' alt='Img' width='20' height='20' border='0' />", "http://www.cnn.com/"],
    	["MSNBC", "http://www.msnbc.com/"],
    	["Google", "http://www.google.com/"],
    	["BBC News", "http://news.bbc.co.uk"] //no comma following last entry!
    ]
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  3. The Following User Says Thank You to vwphillips For This Useful Post:

    adam_design (01-21-2011)

  4. #3
    Join Date
    Jan 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    that's perfect many thanks for your guidance.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •