Jquery MCQs | Jquery Multiple Choice Questions and Answers

Sports GK Questions and Answers 2024 (Latest Updated)

Awards & Honours GK Questions 2024 (Latest Updated)

Questions
1 When referencing an HTML element preceded by a # (pound or hash), what javascript function is this equivalent to?
A getElementByClassName
B getElementByTagName
C getElementById
D None of the above

Answer: getElementById
2 What is the each function used for?
A The Each function allows you to loop through different elements with a class or ID
B The Each function allows you to put the word "Each" into each element
C The Each function allows you to loop though every element in a parent element
D None of the above

Answer: The Each function allows you to loop through different elements with a class or ID
Advertisement
Article and Schedule Quiz Start Test!
DOWNLOAD CURRENT AFFAIRS PDF FROM APP
3 What are the various speed options?
A Only the words "slow", "fast", and "medium"
B The words "slow" and "fast" as well as integers for the milliseconds
C None of the above
D All of the above

Answer: The words "slow" and "fast" as well as integers for the milliseconds
4 If you want to stop your jQuery for a few milliseconds, which function do you use?
A delay()
B slowdown()
C pause()
D stop()

Answer: delay()
5 When do you use the $(this) code?
A When an HTML element will reference its parent element's action
B When an HTML element will reference the entire document
C When an HTML element will reference its own action
D None of the above

Answer: When an HTML element will reference its own action
6 How do you fetch the first span on the page, which has the class ‘green’?
A $('span.green:first')
B $('span, .green, :first')
C $('first .green span')
D None of the above

Answer: $('span.green:first')
7 Which of the following is correct?
A jQuery is a JSON Library
B jQuery is a JavaScript Library
C None of the above
D All of the above

Answer: jQuery is a JavaScript Library
8 What is the difference between .width() and .outerWidth()?
A The methods are basically the same. The only difference is that .width() returns a number, whereas outerWidth() a string
B No difference. width() is a shorthand alias for outerWidth()
C width() returns the computed width of the element, while outerWidth() returns the width plus all the margins and paddings
D None of the above

Answer: width() returns the computed width of the element, while outerWidth() returns the width plus all the margins and paddings
9 Which function do you reference in HTML form data?
A val()
B formData()
C value()
D None of the above

Answer: val()
10 The speed options can be applied to which jQuery functions?
A show and fadeIn
B toggleCss
C css and ajax
D All of the above

Answer: show and fadeIn
11 You can test whether the browser supports specific features using...
A $.browserTest
B $.browser
C $.featureTest
D $.support

Answer: $.support
12 Query.noConflict(true) is used to..
A Improve compatibility
B Remove all jQuery variables from the global scope
C Free up the $ symbol for use by other libraries
D All of the above

Answer: All of the above
13 The method that provides AJAX functionality within jQuery is named..
A easyAJAX
B jQueryajax
C ajax
D None Of The Above

Answer: ajax
14 You can attach a handler to an event using which method?
A bind
B eventAttach
C eventBind
D attach

Answer: bind
15 $('#masterList').find('li') .width(500).addClass('selected'); The phenomena occuring in the above code is called?
A Animating
B AJAX
C Event bubbling
D Chaining

Answer: Chaining
16 What is jQuery?
A jQuery is a library of JavaScript Functions
B jQuery stands for Structured Query Language
C jQuery stands for Cascading Style Sheets
D jQuery communication between computers on the Internet

Answer: jQuery is a library of JavaScript Functions
17 Load remote data using HTTP GET
A $.getScript(url,callback)
B $.post(url,data,callback,type)
C $.ajax(options)
D $.get(url,data,callback,type)

Answer: $.get(url,data,callback,type)
18 When referencing an HTML element preceded by a . (dot), what javascript function is this equivalent to?
A getElementByTagName
B getElementByClassName
C getElementById
D None of the above

Answer: None of the above
19 Why do we usually add the stop() method before calling animate()?
A stop() ends any currently running animations on the element, and prevents conflicts and pile-ups
B We tell jQuery that the animation has to be stopped at some point
C stop() halts the execution of the scripts on the page until the animation has finished
D none of the above

Answer: stop() ends any currently running animations on the element, and prevents conflicts and pile-ups
20 With jQuery, look at the following selector: $("div.intro"). What does it select?
A All div elements with class="intro"
B The first div element with id="intro"
C The first div element with class="intro"
D All div elements with id="intro"

Answer: All div elements with class="intro"

Random GK Questions

Assam Direct Recruitment Test Series

Teacher Eligibility Test

Assam Direct Recruitment Test Series