Results 1 to 2 of 2
Thread: Adding image next to link
Jul 3, 2011, 23:05 #1
- Join Date
- Nov 2005
- 0 Post(s)
- 0 Thread(s)
Adding image next to link
If you look at the "shop by category" section of the link below, there are expandable menus displaying the categories. My problem is that the categories are links, so when one is selected, not only is it expanded but the page also reloads. How could I go about separating the bullet from the <li> and <a> elements so that when the bullet is clicked, it will expand the menu and if the actual name is selected, it will go to that category?
I'd appreciate if someone could just point me in the right direction. Thanks.
Jul 4, 2011, 04:17 #2
- Join Date
- Jan 2003
- Hampshire UK
- 183 Post(s)
- 6 Thread(s)
There is no real need for Kcup to be a link anyway because when js is disabled the menu is expanded by default. So you could use a span instead of an anchor and just style it to look the same.
A quick fix would be just to remove the href destination.
<li class="submenu"><a href="#nogo">KCup</a>
There is probably a JS solution also in making the link when clicked returned false so that it doesn't follow but that's a question for the JS forum.