Jquery MCQs | Jquery Multiple Choice Questions and Answers
Questions
1
When referencing an HTML element preceded by a # (pound or hash), what javascript function is this equivalent to?
Answer: getElementById
2
What is the each function used for?
Answer: The Each function allows you to loop through different elements with a class or ID
⭐ Make GKSeries Your Preferred Source on Google
Add GKSeries as Preferred Source
3
What are the various speed options?
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?
Answer: delay()
5
When do you use the $(this) code?
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’?
Answer: $('span.green:first')
8
What is the difference between .width() and .outerWidth()?
Answer: width() returns the computed width of the element, while outerWidth() returns the width plus all the margins and paddings
10
The speed options can be applied to which jQuery functions?
Answer: show and fadeIn
11
You can test whether the browser supports specific features using...
Answer: $.support
13
The method that provides AJAX functionality within jQuery is named..
Answer: ajax
15
$('#masterList').find('li')
.width(500).addClass('selected');
The phenomena occuring in the above code is called?
Answer: Chaining
18
When referencing an HTML element preceded by a . (dot), what javascript function is this equivalent to?
Answer: None of the above
19
Why do we usually add the stop() method before calling animate()?
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?
Answer: All div elements with class="intro"