File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Highlighting a menu tab when a sub-menu link below it is clicked

 
anita prat
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have 4 tabs in my jsp and each have 1 or drop-down links below them. The requirement is to highlight the main tab when one of the drop-down links are clicked. Currently the first tab is harcoded to be highlighted , I need to have a javascript which should dynamically highlight the tab upon onclick. How can I achieve this?

In my css:

In the html:
<li class="tab">

<a href="#" id="cust" >Customer</a>
<div id="m0" >
<a href="#">Add</a>
<a href="#">Remove</a>
</div>
<a href="#" id="comp" >Company</a>
<div id="m1" >
<a href="#">Add</a>
<a href="#">Remove</a>
</div>

</li>
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic