Give help. Get help.

  • # May 5, 2011 at 7:17 pm

    I want to add a class on a click event:

    $(‘#nav a’).click(function(){

    The class ‘select’ is to change the look of that #nav a so that it helps the visitor to know on what page they are…
    The code work but the class is added on during the click and then it disapears. How can I do so that it stays even after the click…??

    # May 5, 2011 at 7:21 pm

    I am using wordpress for my site… is there a conflict??? I see that it works on links that I’ve set to a href=”#” but not on links that are active…???

    # May 6, 2011 at 2:47 am

    Sounds like you’re trying to style the navigation tab for the current page?
    If you’re building the navigation dynamically, WP adds the class “current_page_item” to the appropriate li tag automatically that you can style.

    # February 8, 2013 at 6:28 am

    Hi all

    I am useing this code mobile apps not add class in a:link

    Please help me

    # February 8, 2013 at 6:39 am

    @vipinisvest01 I think we need more information but please start a new thread rather than resurrecting one from 2 years ago that may not apply to your specific situation.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Add a class on click event’ is closed to new replies.