Roshan Book

My Tech Notebook

Category Archives: jquery

Jquery

Jquery – Select

• $(“#result#”) selects the item with HTML ID result
• $(“p”) selects all paragraph elements
• $(“p.summary”) selects all paragraph elements with class summary
• $(“a”) selects all anchor tags
• $(“p a”) selects all anchor tags in a paragraph
• $(“p > a”) selects all anchor tags whose immediate parent is a paragraph tag
• $(“li > p”) selects all p tags whose immediate parent is a li tag
• $(“p.summary > a”) selects all anchor tags whose immediate parent is a
paragraph tag with class summary
• $(“table.striped tr:even”) selects even-numbered rows from all tables
belonging to class striped

 

 

%d bloggers like this: