Grow your CSS skills. Land your dream job.

jQuery address plugin: issue with active state

  • # April 19, 2012 at 3:41 pm

    I cannot get it to apply the active class when the link is clicked on, what could I be doing wrong?

    Here is my HTML:

    And here is my JS

    $.address.init(function()
    {
    $('#slides a').address();
    }).change(function()
    {
    $('#slides a').click(function()
    {
    var address = $.address.value($('#slides a').attr('href'));
    alert(address);

    if($(this).attr('href') == address)
    {
    $(this).addClass('active');
    } else {
    $(this).removeClass('active');
    }
    });
    });

    also it is returning [object Object] / undefined for the alert….

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".