MCQ

jQuery MCQs – Multiple Choice Questions and Answers – Part 1

Multiple choice questions and answers (MCQs) on jQuery to prepare for exams, tests, and certifications. These questions are taken from a real written exam and some parts are taken from an interview. So you will find questions on basic techniques such as manipulating the DOM, web standards, CSS selector, DOM element, and more. This quiz will easily prepare anyone to pass their online test.
 

1. Which of the following statements is correct?

A jQuery is a JavaScript library

B jQuery is a JSON library

C jQuery is an Angular library

D All the answers are true

A

 

 

2. jQuery uses CSS selectors and XPath expressions to select items?

A True

B False

A
jQuery selects items based on item name. For example, to hide all items <p> we write:

$("p").hide();

 
XML Path Language (XPath) is a type of language for identifying different elements or their values in XML documents, similar to how CSS identifies elements in HTML documents. For example, to select all the links with a title attribute, we write:

$('a[@title]')

 

 

3. What is the character does jQuery use as a shortcut for jQuery?

A %

B $

B
If there is another library that uses the same $ sign in the same project. In this case you use “jQuery” instead of “$”. The “$” sign is just a shortcut for “jQuery”, so use $("#id") or jQuery("#id") is the same.

 

 

4. What does “min” mean in the following code snippet?
<script src = "jquery-1.5.2.min.js"> </script>

A Minimized version

B Miniature

C Minimized parameters

D Minimum value

A
The min value corresponds to the minimized version of the jQuery library, which contains neither comments nor spaces, nor internal identifiers all are replaced by shorter identifiers.

 

 

5. Is JQuery a W3C standard?

A Yes

B No

B
There are already W3 standards for selecting and manipulating HTML elements, jQuery is just a library that makes that easy. In other words, it is possible to do everything that jQuery can do with JavaScript, so there is no reason to define it as a standard.

 

 

6. $("span"). What does it select?

A All span elements

B The first span element

A

 

 

7. Is jQuery a ___________?

A Client-side library

B Server-side library

A
JQuery is a client-side library written in JS

 

 

8. Which of the following methods is used to hide selected items?

A visible(false)

B hidden()

C display(none)

D hide()

D
The “hide()” method is used to hide an element. Example, all elements <div> will be hidden:

$("div").hide();

 

 

9. JQuery is a programming language?

A True

B False

B
jQuery is not a programming language, but well-written JavaScript code. It is used for browsing documents, handling events, handling interactions and for animations.

 

mcqMCQPractice competitive and technical Multiple Choice Questions and Answers (MCQs) with simple and logical explanations to prepare for tests and interviews.Read More

Leave a Reply

Your email address will not be published. Required fields are marked *