javascript - Is my jQuery syntax wrong here? -


I'm learning jQuery and I think this code is not working:

 < Code> & lt; Script type = "text / javascript" & gt; $ (Document) .ready (/ * Navigtion Stuff * / function () {$ ('. Menu ul'). Hover (function () {$ (this) .Parent (.) AddClass ("active");}, AddClass ("active") ("$") ("$"). );}); & Lt; / Script & gt;  

The first thing that does it is considered. Is not my function bad, is my syntax bad? If not, I thought my code is conflicting with some other javascript on the page.

Thanks in advance!

There is some confusion with your bracket

  $ (document) .ready (/ * Navigtion Stuff * / function () {$ ('. ("Active");}, function () {$ (this) .Parent (). RemoveClass ("active");}); $ ( "Menu"). Parent ("li"). AddClass ("active");});  

Better.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -