jQuery  Web Development Tips And Tricks

jQuery Web Development Tips And Tricks

Question: What is jQuery?

Answer: jQuery is a JavaScript Framework which makes javascript based development easy and also makes DOM traversing / modification easy by using various important syntax of jQuery.



Question: What are the advantage of jQuery and why we need it?


Easy to learn
Easy to use
Cross browser support
DOM manipulation is easy.

Question: Difference between JavaScript and jQuery?
Answer: JavaScript is client side language while jQuery framework developed on JavaScript

Question: What do you understand from sign ($) in jQuery?
Answer: $ sing is just a reference of jQuery you can use any of it check below code

You can also use your own character by using jQuery.noConflict().
jQuery.noConflict what is it?
Answer: $ ()sing used by some other library like mootools and Prototype in such condition it will create conflict if you are using both in your project. To get rid such situation use jQuery.noConflict().

Or specify your own character


Question: What is the difference between onload() and document.ready() function?
Answer: document.ready() get called when DOM is loaded while body.onload()get called when page loaded completely

How we load jQuery through CDN?


Question: How we load jQuery when CDN fails?


Question: What are selectors in query and what type of selectors are available?

Answer: By using selector we can get the information and perform manipulation on any html tags. There are various type of selector some of them mentioned below:
#ID= Select a unique element based on matched ID
.class= Select all the elements base on given class.
(*) = select all available elements in DOM.
Example to Select an element by ID in jQuery:
Answer: $(‘#txtFirstName’) use this to select the an element which following
id=’txtFirstName’ attribute.

Example to Select all Div on page:

Answer: $(“div”)

Example to select all element which has the class “.demo”


Example to select all div with a specific class:

Answer: $(“div .demo”)

Question: Which is Fastest selector in jQuery?
Answer: Html tag selector and ID are fastest selector.

Question: What is the Difference between $(this) and ‘this’ ?
Answer: Both refers to same elements but use of both on same element is listed below
Using “ $(this)”

Using “this”

Question: How do you check the empty element?

How to count number of div element on page?

Count all div which has the class name .demo?


What is the use of $ .each() element?

Answer: $.each() function can be used to loop through or iterate over the elements on the page .

What is the parent() and parents() in jQuery?

Answer: By parent() function you can travel only one level above from selected element.
parents() search the whole DOM


One Thought on “Interview Questions And Answer jQuery

  1. Guest User on April 3, 2015 at 10:11 am said:

    Initially, I thought your headline was misleading, but you actually delivered. Nice job.

Leave a Reply

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

Post Navigation