ul

jQuery: How can I target a specific tag, such as UL?

Tuesday, July 17th, 2012 | Business | No Comments

jQueryjQuery is a flexible javascript framework that lets you do a lot.  One major component of jQuery is the concept of the “selector“.

If you want to apply some jQuery code to an item, you use it’s selector.  For example to turn on a class for all anchor tags (A) you use:

$(“a“).toggleClass(“className”, true);

The “a” in bold is the “selector”.  In this case we told jquery (which is “$”) to select all anchor tags.  We then said, “with what is selected, toggle the className class on”.

› Continue reading

Tags: , , , , , ,


Please share, it makes me happy:

Subscribe to Email Alerts

Follow Me

Follow seangw on twitter

Archives

Categories

prestashop theme

virtuemart template