Google News
logo
jQuery - Quiz(MCQ)
1 .
.css(‘width’) and .width() are the two ways to change the width of _________.
A)
selector
B)
element
C)
fade effect
D)
radio button

Correct Answer : Option (B) :  

element

2 .
What is the correct jQuery code to set the background color of all p elements to red?
A)
$("p").css("background-color","red");
B)
$("p").manipulate("background-color","red");
C)
$("p").style("background-color","red");
D)
$("p").layout("background-color","red");

Correct Answer : Option (A) :  

$("p").css("background-color","red");

3 .
With jQuery, look at the following selector: $("div.intro"). What does it select?
A)
The first div element with class="intro"
B)
All div elements with id="intro"
C)
All div elements with class="intro"
D)
The first div element with id="intro"

Correct Answer : Option (C) :  

All div elements with class="intro"

4 .
What will happen by $("#ftllogo").html()
A)
It will return html from ftllogo id element
B)
It will set blank html to ftllogo id element
C)
It will return html from ftllogo class element
D)
It will set blank html to ftllogo class element

Correct Answer : Option (A) :  

It will return html from ftllogo id element

5 .
Look at the following jQuery selector: $("div#intro .head"). What does it select?
A)
All elements with class="head" inside the first div element with id="intro"
B)
The first element with id="head" inside any div element with class="intro"
C)
All div elements with id="intro" or class="head"
D)
First element with id=“intro” or class=“head”

Correct Answer : Option (A) :  

All elements with class="head" inside the first div element with id="intro"

6 .
How can you get href value from <a href=\"http://www.freetimelearning.com\" id=\"logo\"/>
A)
$("#logo").attr("#href")
B)
$("logo").("href")
C)
$("#logo").attr("href")
D)
$("#logo").href

Correct Answer : Option (C) :  

$("#logo").attr("href")

7 .
What does it mean by toggle()?
A)
Selected element will be fadeIn and FadeOut
B)
Selected element will be animate with toggle
C)
Selected element will be sliding up and down
D)
Selected element will be hide and show

Correct Answer : Option (D) :  

Selected element will be hide and show 

8 .
Which jQuery method is used to hide selected elements?
A)
display(none)
B)
visible(false)
C)
hidden()
D)
hide()

Correct Answer : Option (D) :  

hide()

9 .
The______ method is used to represent an array or an object in serialize manner.
A)
size()
B)
length
C)
param()
D)
None of the above

Correct Answer : Option (C) :  

param()

10 .
The .each method is the more convenient form of _______ loop.
A)
do while
B)
for
C)
for each
D)
None of the above

Correct Answer : Option (B) :  

for