chris
chris

Reputation: 36957

JavaScript/jQuery Syntax error?

I need some eye, I'm not seeing it right now and its making me feel foolish..

function whichNavToLightUp()
{
    var p = location.pathname;
    p = p.substring(p.length-1) == '/' ? p.substring(0, p.length-1) : p;
    p.split('/').pop();
    p = p.substring(1);
    p = p.toLowerCase();
    $.each('.navmenu', funtion()
    {
        if($(this).attr('rel') == p)
        {
            $(this).css({"background-position":"-108px"});  
        }
    });
}

line 9 the { after the $.each() is giving me the syntax error, but I don't see why. Where did I break it? Anyone?

Upvotes: -1

Views: 179

Answers (1)

rickyduck
rickyduck

Reputation: 4084

$.each('.navmenu', funtion() should be $.each('.navmenu', function() (missing c)

Upvotes: 5

Related Questions