Link to home
Create AccountLog in
Avatar of smfmetro10
smfmetro10Flag 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
Avatar of LZ1
LZ1
Flag of United States of America image

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

Avatar of 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
Avatar of LZ1
LZ1
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account