Download PDF
Free download in PDF Jquery Objective Type Questions and Answers for competitive exams. These short objective type questions with answers are very important for Board exams as well as competitive exams. These short solved questions or quizzes are provided by Gkseries.
(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()
(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()
(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
(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
(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
32
var ps = $("p");
ps will be..
[A]
A jQuery object
[B]
An array
[C]
A linked list
[D]
A hash or dictionary
33
The CSS selector engine that jQuery uses is called?
[A]
Sizzle
[B]
Mango
[C]
Badaboom
[D]
AwesomeX
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
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)
Please share this page