Results 1 to 5 of 5

Thread: highlight current anchor hash? jQuery

  1. #1
    Join Date
    Mar 2007
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question highlight current anchor hash? 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?
    Last edited by blwow; 07-21-2008 at 11:48 AM.

  2. #2
    Join Date
    Mar 2007
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    please can someone help?

  3. #3
    Join Date
    Mar 2007
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    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?

  4. #4
    Join Date
    Mar 2007
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    noone can help?
    maybe this site is better to use for an example..
    http://flesler.webs.com/jQuery.LocalScroll/

    when you click the arrows >>
    i want the next section in the left hand menu to change color.. So Section 1-b should turn red once clicked on >> this will give more of an indication to the user of what page they are on..

    Any ideas how to do this???????

  5. #5
    Join Date
    Feb 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Change Text in anchor examples using jQuery

    I found a great page that give numerous downloadable examples of how to change the text inside an anchor using jQuery. They are really helpful for web 2.0 and web 3.0 sites.

    <a href="http://www.ajaxera.com/jquery-change-text-in-anchor/" target="blank">http://www.ajaxera.com/jquery-change-text-in-anchor/</a>

Bookmarks

Posting Permissions

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