1. What is JQuery?
Ans. JQuery is a cross-browser lightweight JavaScript library. In simple words jQuery has been designed to make navigation to any element easier, or adding/invoking event handlers on your HTML page and also simplify the way you access the elements in your web pages, provide help in working with client-side events, enable visual effects like animation, and make it easier to use Ajax in your applications.
A quick look at what is available in jQuery:
- Cross-browser support and detection.
- AJAX functions
- CSS functions
- DOM manipulation
- DOM transversal
- Attribute manipulation
- Event detection and handling.
- JavaScript animation
- Hundreds of plugins for pre-built user interfaces, advanced
animations, form validation, etc.
- Expandable functionality using custom plugins.
Q2. What is jQuery UI?
Ans. jQuery UI enable our applications to have a cool user interface and animation in a faster way. It is the set of plug-ins that include interface interactions, effects, animations, widgets and themes built on the JavaScript Library. jQuery is used to create cohesive and consistent APIs. It is a method that we can use to extend jQuery prototype objects. By that prototype object you can enable all jQuery objects to inherit any method that you add.
Interactions
We can use interactions for basic mouse-based behaviours to any element. Examples of Interactions are the following:
- Draggable
- Droppable
- Resizable
- Selectable
- Sortable
Q3. What is a CDN?
Ans. Content Delivery Network (CDN) in simple terms is a collection of servers spread across the globe. In other words, a CDN is a network of servers in which each request will go to the closest server.
Need For a CDN
For any web application, data can be categorized into either static or dynamic content. Dynamic content is the one that generally comes from a database. Static content is like CSS, images, JavaScript, flash files, video files and so on.
Q4. What are selectors in jQuery and
how many types of selectors are there?
Ans. The basic operation in jQuery is selecting an element in DOM. This is done with the help of $() construct with a string parameter containing any CSS selector expression. $() will return zero or more DOM elements on which we can apply an effect or style.
Q5. What is the advantage of using minimized version of
jQuery?
Ans. Efficiency of web page increases when minimized
version of jQuery is used.min.js file will be more than 50% less than the
normal js file. Reduction in the file size makes the web page faster.
Q6. What are the basic selectors in jQuery?
Ans. Following are the
basic selectors in jQuery:
·
Element ID
·
CSS Name
·
Tag Name
·
DOM hierarchy
Q7. What is the use jQuery.data method?
Ans. jQuery.data
methods is used to associate the data with the DOM nodes and the objects. This
data method makes the jQuery code clear and concise.
Q8. What is the use of each function in jQuery?
Ans. Each
function is used to iterate each and every element of an object. It is used to
loop DOM elements, arrays and the object properties.
Q9. What are the four parameters used
for jQuery Ajax method?
Ans. The four parameters are
·
URL – Need to specify the URL to
send the request
·
type – Specifies type of
request(Get or Post)
·
data – Specifies data to be sent
to server
·
Cache – Whether the browser should
cache the requested page
Q10. What is the use of jQuery
filter?
Ans.The jQuery filter is used to filter the certain values from the object
list based on the criteria. Example is to filter certain products from the
master list of products in a cart website.
Summary
I hope these questions and answers
will help you to crack your jQuery Interview. These interview Questions have
been taken from our new released article jQuery Interview Questions and
Answers.
0 Comments