jQuery Multiple choices


Total available count: 24
Subject - JavaScript Frameworks
Subsubject - jQuery

With jQuery, look at the following selector: $("div.intro"). What does it select?


 

 

 

 



D


Solution:-

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

 




Next 5 multiple choice(s)

1

Which jQuery method is used to hide selected elements?

2

Which jQuery method is used to set one or more style properties for selected elements?

3

Which jQuery method is used to perform an asynchronous HTTP request?

4

What is the correct jQuery code for making all div elements 100 pixels high?

5

What scripting language is jQuery written in?

Comments