Google News
logo
jQuery - Quiz(MCQ)
1 .
Who is inventor of jQuery ?
A)
Guido van Rossum
B)
Brendan Eich
C)
Rasmus Lerdorf
D)
John Resig

Correct Answer : Option (D) :  

John Resig

2 .
jQuery initial release date ?
A)
August 11, 2006
B)
August 14, 2006
C)
August 26, 2006
D)
August 30, 2006

Correct Answer : Option (C) :  

August 26, 2006

3 .
Which of the following is correct?
A)
jQuery is a JavaScript Library
B)
jQuery is a JSON Library
C)
jQuery is a Ajax Library
D)
jQuery is a AngularJS Library

Correct Answer : Option (A) :  

jQuery is a JavaScript Library

4 .
Which sign does jQuery use as a shortcut for jQuery?
A)
the ? Sign
B)
the % sign
C)
the $ sign
D)
the # sign

Correct Answer : Option (C) :  

the $ sign

5 .
Is jQuery a library for what type of scripting?
A)
Client scripting
B)
Server scripting
C)
PHP scripting
D)
Database scripting

Correct Answer : Option (A) :  

Client scripting

6 .
What scripting language is jQuery written in?
A)
C++
B)
VBScript
C)
JavaScript
D)
C#

Correct Answer : Option (C) :  

JavaScript

7 .
jquery html() method works for _______
A)
HTML
B)
XML
C)
HTML and XML
D)
None of the above

Correct Answer : Option (A) :   HTML

8 .
To select all the elements in the page which symbol do we have to used?
A)
#
B)
$
C)
!
D)
*

Correct Answer : Option (D) :  

*

9 .
What is full form of CDN?
A)
Content Distribution Network
B)
Common Distribution Network
C)
Collective Distribution Network 
D)
None of the above

Correct Answer : Option (A) :  

Content Distribution Network

10 .
What is meaning of AHAH ?
A)
Asynchronous HTTP and HTML
B)
Asynchronous HTTP and HTTPs
C)
Alternate HTTP and HTML
D)
None of the above

Correct Answer : Option (A) :  

Asynchronous HTTP and HTML

11 .
.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

12 .
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");

13 .
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"

14 .
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

15 .
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"

16 .
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")

17 .
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 

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

Correct Answer : Option (D) :  

hide()

19 .
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()

20 .
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

21 .
Which jQuery method is used to perform an asynchronous HTTP request?
A)
jQuery.ajaxSetup()
B)
jQuery.ajax()
C)
jQuery.ajaxAsync()
D)
None of the above.

Correct Answer : Option (B) :  

jQuery.ajax() 

22 .
What is the correct jQuery code for making all div elements 100 pixels high?
A)
$("div").height(100)
B)
$("div").height="100"
C)
$("div").yPos(100)
D)
None of the above.

Correct Answer : Option (A) :  

$("div").height(100)

23 .
Which jQuery function is used to prevent code from running, before the document is finished loading?
A)
$(document).ready()
B)
$(body).onload()
C)
$(document).load()
D)
$(load).document()

Correct Answer : Option (A) :  

$(document).ready()

24 .
Which jQuery method should be used to deal with name conflicts?
A)
conflict()
B)
noNameConflict()
C)
nameConflict()
D)
noConflict()

Correct Answer : Option (D) :  

noConflict()

25 .
Which jQuery method is used to switch between adding/removing one or more classes (for CSS) from selected elements?
A)
switch()
B)
toggleClass()
C)
altClass()
D)
switchClass()

Correct Answer : Option (B) :  

toggleClass()

26 .
Look at the following selector: $(":disabled"). What does it select?
A)
All hidden elements
B)
All elements that does not contain the text "disabled"
C)
All disabled input elements
D)
All elements containing the text "disabled"

Correct Answer : Option (C) :  

All disabled input elements

27 .
Which jQuery method returns the direct parent element of the selected element?
A)
ancestor()
B)
parents()
C)
parent()
D)
ancestors()

Correct Answer : Option (C) :  

parent()

28 .
jQuery ______is used to set/return arbitrary data to/from an element.
A)
.data()
B)
.item()
C)
.all
D)
All of these

Correct Answer : Option (A) :  

.data()

29 .
Which method acts on JQuery objects and translate the match DOM element into query string that can be pass along with AJAX request.
A)
.serialize()
B)
.serializeAll()
C)
.synchronized()
D)
None of the above

Correct Answer : Option (A) :  

.serialize()

30 .
How many methods are available in jquery to give fade effect to the elements?
A)
One
B)
Two
C)
Three
D)
Four

Correct Answer : Option (C) :  

Three

31 .
The .animate() method comes in ______ forms.
A)
One
B)
Two
C)
Three
D)
Four

Correct Answer : Option (B) :  

Two

32 .
How many ways are there to change the width of the element in jquery.
A)
Two
B)
Three
C)
Four
D)
None of the above

Correct Answer : Option (A) :  

Two

33 .
How many types of selectors available in jquery.
A)
One
B)
Two
C)
Three
D)
Four

Correct Answer : Option (C) :  

Three

34 .
What does .size() method of jquery returns?
A)
No. of element in object
B)
No. of variable in object
C)
Both a and b
D)
None of the above

Correct Answer : Option (A) :  

No. of element in object

35 .
Highlight page element under mouse cursor by using :
A)
.hover()
B)
.stopPropagation()
C)
.toggle() 
D)
.trigger()

Correct Answer : Option (A) :  

.hover()

36 .
Which Method acts as explicit iterator.
A)
.hover()
B)
.all()
C)
.toggle()
D)
.each()

Correct Answer : Option (D) :  

.each()

37 .
$.grep(array1, function1);

The above statement ___ the elements of array1 array which satisfy function1 function.

A)
filters
B)
updates
C)
removes
D)
sorts

Correct Answer : Option (A) :  

filters

38 .
To deal with cookies in jQuery we have to use ______ cookie plugin
A)
Dough
B)
Session
C)
Dazzler
D)
None of the above

Correct Answer : Option (A) :  

Dough

39 .
Using ________ function, we can hold or release the execution of jQuery’s ready event.
A)
jQuery.holdReady()
B)
jQuery.ready()
C)
jQuery.hold() 
D)
jQuery.holdready()

Correct Answer : Option (A) :  

jQuery.holdReady() 

40 .
Which method works for accepting an array of DOM elements and pushes them into a stack.
A)
push()
B)
pop()
C)
pushStack()
D)
popStack()

Correct Answer : Option (C) :  

pushStack()

41 .
Which method is provided by the jquery to create our own custom animation with fine-grained control.
A)
.animation()
B)
.stopPropagation()
C)
.toggle()
D)
.animate()

Correct Answer : Option (D) :  

.animate()

42 .
Which of the following Jquery library extension?
A)
.html
B)
.XML
C)
.js
D)
.lib

Correct Answer : Option (C) :  

.js 

43 .
Consider the following code snippet:
  .Items 1
  .Items 2
  .Items 3
Which of the following code snippets returns the same result as $(‘#id1 li’).not($(‘#li2’));?
A)
$(‘#id2’).siblings(‘#li2’);
B)
$(‘#li2’).siblings();
C)
$(‘#li2’).children();
D)
$(‘#id2’).children(‘#li2’);

Correct Answer : Option (B) :  

$(‘#li2’).siblings();

44 .
Consider the following code snippet?
function function1()
  {
    alert(arguments.length());
  }​
Which of the following is true when you run function1();?
A)
An error occurs because arguments variable is undefined.
B)
An error occurs because you call function1 with no arguments.
C)
The alert box displays “undefined”.
D)
The alert box displays 0.

Correct Answer : Option (B) :  

An error occurs because you call function1 with no arguments.

45 .
$.extend(false, object0, object1, object2);

 What does the code above do?

A)
Extends the object0 by merging object1 and object2 with object0.
B)
Extends the object1 by merging object0 and object2 with object1.
C)
Extends the object2 by merging object0 and object1 with object2.
D)
The statement is invalid because its arguments are invalid.

Correct Answer : Option (A) :  

Extends the object0 by merging object1 and object2 with object0.

46 .
The ………. method is like offset(), except that it is a getter only and it returns element positions relative to their offset parent, rather to the document as a whole.
A)
width()
B)
position()
C)
setparent()
D)
offsetparent()

Correct Answer : Option (B) :   position()

47 .
 jQuery code to set the background color of all span elements to blue?
A)
$(“span”).style(“background-color”,”blue”);
B)
$(“span”).css(“background-color”,”blue”);
C)
$(“span”).manipulate(“background-color”,”blue”);
D)
$(“span”).layout(“background-color”,”blue”);

Correct Answer : Option (B) :   $(“span”).css(“background-color”,”blue”);

48 .
Which of the following is used for parsing JSON text?
A)
jQuery.each()
B)
jQuery.parseJSON()
C)
jQuery.noConflict()
D)
None of the above

Correct Answer : Option (B) :   jQuery.parseJSON()

49 .
Select all elements that contain the specified text.
A)
:selects()
B)
:contains()
C)
Both
D)
None of the above

Correct Answer : Option (A) :   :selects()

50 .
jQuery method is used to perform an asynchronous HTTP request?
A)
jQuery.ajaxAsync()
B)
jQuery.ajaxSetup()
C)
jQuery.ajax()
D)
None of the above

Correct Answer : Option (C) :   jQuery.ajax()

51 .
CDN stands for_______
A)
Content Distribution Network
B)
Common Distribution Network
C)
Collective Distribution Network
D)
None of the above

Correct Answer : Option (A) :   Content Distribution Network

52 .
The ________ method works for accepting an array of DOM elements and pushes them into a stack.
A)
push()
B)
pop()
C)
popStack()
D)
pushStack()

Correct Answer : Option (D) :   pushStack()

53 .
How many types of selectors available in jquery.
A)
1
B)
2
C)
3
D)
4

Correct Answer : Option (C) :   3