Avatar of smfmetro10
smfmetro10
Flag for United States of America asked on

jQuery Vertical Multilevel Menu, with Images

Hi,

I'd like to create a jQuery vertical multilevel menu, like the one here:
http://users.tpg.com.au/j_birch/plugins/superfish/#sample3
which I can do.  But I'd like to use images for the buttons, instead of html text, with rollover images too.  I can't just use a global background image for the buttons, because all the images have to be different, because I want the image to include the text (we're using stylized font).  Does anyone have a solution for this?

Thank you!
Matt
jQueryCSSJavaScript

Avatar of undefined
Last Comment
LZ1

8/22/2022 - Mon
LZ1

You will have to create an ID to target each individual menu item.  Then in your CSS use the id to target the background image for each button.
See below:

<li id="item1">						
<a class="sf-with-ul" href="#a">menu item<span class="sf-sub-indicator"> »</span></a>
<ul style="display: none; visibility: hidden;">
<li> <a id="item1" href="#aa">menu item</a></li>
</ul>

****CSS****
#menu #item1 {
	background: url(your-image.jpg);
}
#menu #item2  {
	background: url(another-image.jpg);
}

Open in new window

smfmetro10

ASKER
Hi LZ1,

Thanks for your comment!  So for a rollover change, would I do something like a hover for each menu item?

Matt
ASKER CERTIFIED SOLUTION
LZ1

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck