Jquery/Jquery Mcq Set 1 Sample Test,Sample questions

Question:
 The jQuery method used for parsing the JSON text is -

1.parseJSON() method

2.parseHTML() method

3.noConflict() method

4.each() method


Question:
 The jQuery method used to remove the set of matched elements is -

1.delete() method

2.empty() method

3.remove() method

4.none of the above


Question:
 Which of the following jQuery method is used to check whether or not the selected elements have the specified class name?

1.hasClass() method

2.addClass() method

3.find() method

4.toggleClass() method


Question:
 Which of the following method in jQuery is used to make copies of the set of matched elements?

1.jQuery detach() method

2.jQuery delegate() method

3.jQuery clone() method

4.jQuery serialize() method


Question:
 Which of the following method is used to toggle between the fadeIn() method and fadeOut() method?

1.toggle() method

2.fadeToggle() method

3.slideToggle() method

4.animate() method


Question:
$(this) in jQuery is used when -

1.an HTML element references the entire document

2.an HTML element references its own action

3.an HTML element references the action of its parent element

4.All of the above


Question:
Can we use multiple document.ready() function on the same page?

1.Yes

2.No

3.Can't say

4.Not possible


Question:
CDN stands for -

1.Content development network

2.Content delivery network / Content distribution network

3.Communication development network

4.none of the above


Question:
If the names of variables are the same, then which of the following type of variable takes precedence?

1.local variable

2.global variable

3.both (a) & (b)

4.none of the above


Question:
jQuery is a -

1.JavaScript method

2.JavaScript library

3.JSON library

4.PHP method


Question:
The :even and :odd filters in jQuery are used to -

1.determine if the number is odd or even

2.determine if the index position of an element is odd or even

3.both (a) & (b)

4.none of the above


Question:
The code $("p").css("background-color","yellow") is equivalent to -

1.jQuery("p").css("background-color","yellow")

2.document("p").css("background-color","yellow")

3.jq("p").css("background-color","yellow")

4.none of the above


Question:
The correct syntax for selecting the first paragraph element with id p1 is -

1.$("p.p1:first")

2.$("p#p1:first")

3.$("p1#p:first")

4.none of the above


Question:
The correct syntax to set the background color of all h1 elements to yellow in jQuery -

1.$("h1").style("background-color","yellow");

2.$("h1").html("background-color","yellow");

3.$("h1").css("background-color","yellow");

4.$("h1").layout("background-color","yellow");


Question:
The jQuery method used to find all previous sibling elements of the current element is -

1.nextAll() method

2.prevAll() method

3.siblings() method

4.none of the above


Question:
The jQuery method used to get all ancestors of the matched set of elements is -

1.parents() method

2.parent() method

3.offsetParent() method

4.none of the above


Question:
The jQuery method used to load data using HTTP get is -

1.get(URL, data, callback, dataType) method

2.post(URL, data, callback, dataType) method

3.ajax() method

4.ajaxSend() method


Question:
The jQuery method used to perform an asynchronous HTTP request -

1.jQuery ajaxSetup() method

2.jQuery ajaxSync() method

3.jQuery ajax() method

4.none of the above


Question:
The jQuery method used to return the direct parent element of the selected element is -

1.parents() method

2.parent() method

3.offsetParent() method

4.none of the above


Question:
The jQuery method used to set the width property of an element is -

1.setWidth( val ) method

2.width( val ) method

3.setCSSWidth( val ) method

4.none of the above


Question:
The jQuery method used to trigger a specified event handler for the selected element is -

1.jQuery trigger() method

2.jQuery toggle() method

3.jQuery eq() method

4.jQuery next() method


Question:
The jQuery method which is used to remove the tabs, space and the line breaks from the beginning and end of the specified string is -

1.jQuery empty() method

2.jQuery trim() method

3.jQuery remove() method

4.jQuery serialize() method


Question:
The jQuery selector used to select the elements containing the specified string is -

1.jQuery :contains selector

2.jQuery :lang() selector

3.jQuery :nth-child selector

4.none of the above


Question:
The jQuery selector used to select the elements with the specified language code is -

1.jQuery :contains selector

2.jQuery :lang() selector

3.jQuery :nth-child selector

4.none of the above


Question:
The jQuery used to find all next sibling elements after the current element is -

1.find() method

2.nextAll() method

3.siblings() method

4.none of the above


Question:
The selector $(":disabled") will select -

1.The elements with the text ":disabled"

2.The elements that do not include the text ":disabled"

3.The hidden elements

4.All disabled input elements


Question:
The toggle() method in jQuery is used to -

1.toggle between the hide() and show() methods

2.toggle between the fadeIn() and fadeOut() methods

3.toggle between the slideUp() and slideDown() methods

4.none of the above


Question:
What does the syntax $("div#myDiv .para") will select?

1.It will select all elements with class = "para" within the div element with id = "myDiv"

2.It will select all elements with id = "myDiv" within the div element with class = "para"

3.All div elements with class = "para" or with id = "myDiv"

4.none of the above


Question:
What does the syntax $("p span") will select?

1.All span elements inside the paragraph element

2.Only first span element inside the paragraph element

3.Only last span element inside the paragraph element

4.none of the above


Question:
What does the syntax $("p") will select?

1.All paragraph elements

2.Only first paragraph element

3.Only last paragraph element

4.none of the above


Question:
What does the syntax $("p.para") will select?

1.The first paragraph element with class = "para"

2.The first paragraph element with id = "para"

3.The first paragraph element with name = "para"

4.All paragraph elements with class = "para"


Question:
Which jQuery method is used to set one or more style properties to the selected element?

1.The html() method

2.The style() method

3.The css() method

4.All of the above


Question:
Which of the following is the basic requirement to start with jQuery?

1.To use jQuery, first, we have to buy the jQuery library from its official website.

2.To use jQuery, we don't require anything as it is already built in the browser we are using.

3.To use jQuery, we have to refer to its hosted library, or we can download the latest jQuery version from its official website.

4.All of the above


Question:
Which of the following is the correct code in jQuery to make all div elements 150px high?

1.$("div").height(150);

2.$("div").height = "150" ;

3.$("div").height = 150 ;

4.none of the above


Question:
Which of the following jQuery method can be used to deal with the name conflicts?

1.The conflict() method

2.The nameConflict() method

3.The noConflict() method

4.none of the above


Question:
Which of the following jQuery method is used to add/remove one or more classes from the selected elements?

1.toggleClass() method

2.fadeToggle() method

3.toggle() method

4.slideToggle() method


Question:
Which of the following jQuery method is used to attach a handler to an event?

1.unbind() method

2.attach() method

3.bind() method

4.none of the above


Question:
Which of the following jQuery method is used to hide the selected elements?

1.The hidden() method

2.The hide() method

3.The visible(false) method

4.The display(none) method


Question:
Which of the following jQuery method is used to merge the content of two or more objects into the first object?

1.jQuery extend() method

2.jQuery eq() method

3.jQuery data() method

4.jQuery param() method


Question:
Which of the following jQuery method is used to reduce the set of matched elements to a single element?

1.isEqual() method

2.val() method

3.eq() method

4.delegate() method


Question:
Which of the following jQuery method is used to replace all selected elements with new HTML elements?

1.jQuery replaceWith() method

2.jQuery replaceAll() method

3.jQuery load() method

4.jQuery delegate() method


Question:
Which of the following jQuery method is used to set the value of an element?

1.val() method

2.setValue() method

3.content() method

4.none of the above


Question:
Which of the following jQuery method is used to stop jQuery for few milliseconds?

1.stop() method

2.delay() method

3.slowdown() method

4.pause() method


Question:
Which of the following jQuery method returns all siblings of the selected element?

1.jQuery ancestors() method

2.jQuery siblings() method

3.jQuery parents() method

4.none of the above


Question:
Which of the following jQuery method returns the direct children of the selected element?

1.jQuery ancestors() method

2.jQuery next() method

3.jQuery children() method

4.none of the above


Question:
Which of the following method is used to remove the specified attribute from the selected element?

1.jQuery remove() method

2.jQuery empty() method

3.jQuery removeAttr() method

4.jQuery error() method


Question:
Which of the following selector in jQuery is used to select the elements with lesser index value than the value of its index parameter?

1.jQuery :lt() selector

2.jQuery :gt() selector

3.jQuery :lang() selector

4.jQuery :nth-child selector


Question:
Which of the following sign is used as a shortcut for jQuery?

1.the % sign

2.the & sign

3.the $ sign

4.the @ sign


Question:
Which of the jQuery function prevents the code from running before the loading of the document finishes?

1.$(document).load()

2.$(document).unload()

3.$(document).ready()

4.$(document).trim()


Question:
Who developed jQuery, and in which year it was first released?

1.John Richard in 2001

2.Mark Bensman in 2004

3.John Resig in 2006

4.none of the above


More MCQS

  1. Jquery Mcq Set 1
  2. Jquery Mcq Set 2
  3. Jquery Mcq Set 3
Search
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!