Grow your CSS skills. Land your dream job.

Current page item

  • Rai
    # December 3, 2011 at 2:33 pm

    Hi, I find this little function here in css-tricks but is not working on project.

    Any ideas:

    < ?php

    $(function(){
    $("a").each(function(){
    if ($(this).attr("href") == window.location.pathname){
    $(this).addClass("current");
    }
    });
    });

    ?>
    # December 6, 2011 at 3:37 pm

    This is javascript, not php

    ?

    Rai
    # December 13, 2011 at 12:30 pm

    True. My fault.

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

You must be logged in to reply to this topic.

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