Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2007
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question highlight an anchor when clicking a diff. anchor? jQuery

    Click this link to see what I am trying to do: http://www.gulaab.co.uk/test/menu.php

    When you click View Main Courses >>
    Code:
    <a href="#tandoori" class="next">View Main Courses &gt;&gt;</a>
    it makes all of the menu on the left red.. I just want the next item on the menu to highlight (Tandoori dishes)
    Code:
    <li class="main_courses"><a href="#tandoori" class="selected">Tandoori dishes</a></li>
    This is the jQuery that makes everything red:
    Code:
    jQuery(function( $ ){
    	$('a.next').click(function(){
    	$('#gulaab_menu ul li a').removeClass('selected');
    	$('#gulaab_menu ul li a').toggleClass('selected');
    	});
    	});
    Any ideas how to get this working so only Tandoori dishes is highlighted and not the whole menu?
    And when you click the next >> link inside the Tandoori dishes page (Chief Specialities >>) this will then highlight the Chief Specialities on the left.

  • #2
    New Coder
    Join Date
    May 2007
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts
    More of an explanation of what I want to do:

    After clicking view main courses you will see Chief Specialities >> and so when you click Chief Specialities I want Chief Specialities to highlight on the left menu.. You will also see << Starters in the Tandoori page so when you click << Starters I want the Starters link on the left menu to highlight..

    Any ideas how to get this working?


  •  

    Posting Permissions

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