css - Getting jQuery to make item "selected" -


I'm new to jQuery and I'm looking to use it to select the current menu item (because it's your Looks in hover position.)

My alert is firing, so the function is starting. When this comment is not made, the first description, the background color works yellow. However, I can not find others in influencing the menu "selected" class does not seem to work. In other words, the item that I select in the menu is highlighted in yellow until the page changes, then it goes back to the default color. I have tried several combinations to select, including the Sylhet class is. Only selected.

jQuery

  & lt; Script & gt; $ (Document) .ready (function () {$ ('. Nav ul li'). (Function () {Warning ("go!"); / * $ ('A', this) .css (" Background $ ('A', this) .addClass ('selected');})}}; & lt; / scripts & gt;   

HTML

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -