JOIN ADRE 2.0 Telegram Group

Jquery MCQs | Jquery Objective Type Questions and Answers

Questions
21 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").style("background-color","red");
C $("p").layout("background-color","red");
D $("p").manipulate("background-color","red");

Answer: $("p").css("background-color","red");
22 Which jQuery method is used to hide selected elements?
A hide()
B visible(false)
C display(none)
D hidden()

Answer: hide()
Advertisement
Article and Schedule Quiz Start Test!

DOWNLOAD CURRENT AFFAIRS PDF FROM APP

23 Which statement is true?
A To use jQuery, you can refer to a hosted jQuery library at Google
B To use jQuery, you must buy the jQuery library at www.jquery.com
C To use jQuery, you do not have to do anything. Most browsers (Internet Explorer, Chrome, Firefox and Opera) have the jQuery library built in the browser
D None of the above

Answer: To use jQuery, you must buy the jQuery library at www.jquery.com
24 Which jQuery method should be used to deal with name conflicts?
A conflict()
B noConflict()
C nameConflict()
D noNameConflict()

Answer: conflict()
25 Which jQuery method is used to switch between adding/removing one or more classes (for CSS) from selected elements?
A switchClass()
B switch()
C toggleClass()
D None of the above

Answer: switchClass()
26 Which statement best explains what "unobtrusive JavaScript" is?
A JavaScript that is separate from HTML
B JavaScript that doesn't annoy users
C JavaScript that works even with scripting turned off
D JavaScript that does not affect a web page

Answer: JavaScript that is separate from HTML
27 Which of these is NOT a valid comment in JavaScript?
A /* This is a comment
B /* This is a comment. */
C // This is a comment
D All of the above

Answer: // This is a comment
28 In JavaScript, we can keep a reference to the context outside a function by assigning it to a variable: var self = this. In CoffeeScript, we use:
A printScope => console.log this
B self = this printScope -> console.log self
C printScope => console.log @
D All of the above

Answer: All of the above
29 What is the correct JavaScript syntax to write "Hello World"?
A document.write("Hello World")
B response.write("Hello World")
C ("Hello World")
D None of the above

Answer: document.write("Hello World")
30 jQuery is a...
A Ruby Gem
B PHP Frameworks
C JavaScript library
D None of the above

Answer: JavaScript library
31 $.foo() is equivalent to..
A jQuery.foo()
B javascript.foo()
C document.foo()
D None of the above

Answer: jQuery.foo()
32 var ps = $("p"); ps will be..
A A jQuery object
B An array
C A linked list
D A hash or dictionary

Answer: A jQuery object
33 The CSS selector engine that jQuery uses is called?
A Sizzle
B Mango
C Badaboom
D AwesomeX

Answer: Sizzle
34 The jQuery library contains the following features
A JavaScript Effects and animations. HTML DOM traversal and modification. AJAX. Utilities
B HTML element selections. HTML element manipulation .HTML event functions
C CSS manipulation. JavaScript Effects and animations. HTML DOM traversal and modification
D all of the above

Answer: all of the above
35 AJAX and jQuery
A With jQuery AJAX, you can request TXT, HTML, XML or JSON data from a remote server using both HTTP Get and HTTP Post
B jQuery provides a rich set of methods (functions) for AJAX web development
C a and b
D AJAX and jQuery are cross-platform (you can develop in Windows and serve on a Unix platform)

Answer: a and b

ADRE 2.0 FULL LENGTH MOCK TEST

Take Mock Tests

Missiles Mock Test Start Test!
SSC MTS Mock Test Start Test
IBPS CLERK MOCK TEST Start Test
SSC MTS 2022 JULY 26 Shift 1 (ENGLISH) Start Test!
SSC GD Previous Year Paper 2021 Nov 17 Shift - I (Hindi) Start Test!
SSC CGL Tier - 1 PYP 2022 April 21 Shift- 1 (ENGLISH) Start Test!
MPSC PAPER I MOCK TEST 1 (ENGLISH) Start Test!
IB Security Assistant Mock test 1 (english) Start Test!
UP POLICE CONSTABLE MOCK TEST 1 Start Test!
DELHI POLICE CONSTABLE MOCK TEST 1 (HINDI) Start Test!
Advertisement
Assam Direct Recruitment Test Series