With jQuery, look at the following selector: $("div.intro"). What does it select?
With jQuery, The selector: $("div.intro") selects all div elements with class="intro"
From the above jQuery selector example, it selects all div elements that contain a class called "intro" , some of the jQuery Selectors is as follows:
Selector |
Example |
Selects |
#id |
$("#lastname") |
The element with id="lastname" |
.class |
$(".intro") |
All elements with class="intro" |
.class,.class |
$(".intro,.demo") |
All elements with the class "intro" or "demo" |
element |
$("p") |
All <p> elements |
Which jQuery method is used to hide selected elements?
Which jQuery method is used to set one or more style properties for selected elements?
Which jQuery method is used to perform an asynchronous HTTP request?
What is the correct jQuery code for making all div elements 100 pixels high?
What scripting language is jQuery written in?