Post Reply 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sponsor Ads

This site is
available for
Contact me at
Sponsor Ads

Hey friends, here are the most commonly asked Jquery interview questions and answers for both experienced and beginners ....
You know in these days Jquery become very popular and in every interview you will defiantly face question related to Jquery/javascript, Interviewer must ask Jquery questions.. So be prepare before attend your interview...
And I see many Jquery user want to download .PDF as these questions ans answers set. So In next article I will provide PDF file with 50 Jquery Questions answers.
This is Set-1 containing Top 30 most commonly/impotent Jquery questions with answers:

1).What is Jquery?
jquery is javascript library which required a jquery.js file. After that you can write the jquery as fallows. It uses "$" as the short hand to write jquery code.
Simple Syntax is
    function body

2).When Jquery founded and by whome?
It was released in January 2006 at BarCamp NYC by John Resig(Jquery founder).

3).What scripting language is jQuery written in?
Ans: JavaScript

4).Write a basic code for add jquery library to pages?
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
// You can write the code here
<a href="">Jquery Interview Questions and Answers</a>

5).What is jQuery Selectors? Give some examples.
Ans: Selectors are used in jQuery to find out DOM elements. Selectors can find the elements via ID, CSS, Element name and hierarchical position of the element.

Selector     Example          Selects
*           $("*")          All elements
#id          $("#lastname")      The element with id=lastname
.class          $(".intro")              All elements with class="intro"
element      $("p")          All p elements
For more click here

6).What $("div.tutoriz") will select?
Ans: All the div element with tutoriz class.

7).jQuery uses CSS selectors and XPath expressions to select elements true or false?
Ans:- True

8).What are the fastest selectors in Jquery?
Ans: ID and element selectors are the fastest selectors

9).What are the slower selecoters in Jquery?
Ans: Class selectors are slower

10).Which one is faster Jquery ID selector or JavaScript getElementById()?
(Jquery ID selector vs JavaScript getElementById())
Ans: JavaScript getElementById() is faster than Jquery Id ($("#elementID")) selector

11).Where Jquery code execute? On client browser or server browser?
On client browser

12).Write the code for selecting the
1st div element, 4th div element
last div, and for even and odd div elemets also.
one by one?

apply the red color on the above div.
<div class="questions">
        <div class="box"> Question</div>
    <div class="box"> Question</div>
    <div class="box"> Question</div>
    <div class="box"> Question</div>
    <div class="box"> Question</div>
    <div class="box"> Question</div>
Code for first div       : $("div.questions > div:first").css("color", "red");
Code for 4th div         : $("div.questions > div:nth-child(4)").css("color", "red");
Code for last div        : $("div.questions > div:last").css("color", "red");
Code for even div        : $("div.questions > div:even").css("color", "red");
Code for odd div         : $("div.questions > div:odd").css("color", "red");

13).Write the code for select second last div element?
Code for second last div : $("div.questions > div::nth-last-child(2)").css("color", "red"); <!-- Introduced in CSS3 -->

14).What are the advantages of using jQuery over JavaScript in ASP.NET web application
Below are the advatages of using jQery over JavaScript
a>.Jquery is well written optimised javascript code so
it will be faster in execution unless we write same standard optimised javascript code.
b>.Jquery is concise java script code ,means minimal ammount of code
is to be written for the same functionality than the javascript.
c>.Javascript related Development is fast using Jquery because most of the
functionality is already written in the library and we just need to use that.
d>.Jquery has cross browser support ,so we save time for supporting all the browsers.

15).What is Chaining in jQuery?
In jQuery, Chaining means to connect multiple functions, events on selectors. look at Sample Code 1 and 2.
Sample Code 1
    $('#dvContent').css('color', 'red');

Sample Code 2 (using Chaining)
          .css('color', 'red')
Both the sample codes above will perform the exact same thing but the only difference is that Sample code 2 is using Chaining. But Code 2 is faster and shorter then Code 1.
The problem with the Sample Code 1 is that for every statement, jQuery has to search the entire DOM and find the element and after that executes the attached function on it. But when chaining is used, then jQuery has to find the element only once and it will execute all the attached functions one by one. This is the advantage of Chaining.

16).Is jQuery a library for client scripting or server scripting?
Ans: Client Script

17).What is jQuery & its significance? Why it is so popular?...

18).What are features of JQuery
What can be done using JQuery?

Features of Jquery
1. One can easily provide effects and can do animations.
2. Applying / Changing CSS.
3. Cool plugins.
4. Ajax support
5. DOM selection events
6. Event Handling

19).How to check Jquery UI loaded or not?
Ans: // Checking if jQuery UI is loaded or not
    // jQuery UI is loaded
}else {
    // jQuery UI is not loaded

20).How check currently loaded jQuery UI version on the page?
Ans: // Returns jQuery UI version (ex: 1.8.2) or undefined

21).Write the code for setting datetimepicker on textbox click.
If below is our textbox
<input type="text" id="abc" name=%26quot%3Bacc%26quot%3B value="Select Date" />
then Jquery code will be

22).If you have a table, how you will apply the two differt color on alternate rows using Jquery?
<table border="1">
  <tr><td>Vikas Ahlawat</td></tr>
  <tr><td>Edwin George</td></tr>
  <tr><td>Rohit Khurana</td></tr>
  <tr><td>Gyan Singh</td></tr>
Ans :
<script src="jquery.js"></script>
  $("tr:even").css("background-color", "#f4f4f8");
  $("tr:odd").css("background-color", "#ffffff");

23).Name the Jquery method which is used to hide selected elements?
Ans: .hide()

24).Name the Jquery methods which are used for apply css class?
$("#Id1").addClass('YourClassName'); // for apply class
$("#Id1").removeClass('YourClassName'); // for remove class

25).What is the use of attr() method in Jquery?
The attr() method sets or returns attributes and values of the selected elements.
When this method is used to return the attribute value, it returns the value of the first matched element.
When this method is used to set attribute values, it sets one or more attribute/value pairs for the set of matched elements.
$(selector).attr(attribute) //it will return the value of an attribute
$(selector).attr(attribute,value) //it will set the value of an attribute
$(selector).attr({attribute:value, attribute:value,...}) //for set multiple attribute

26).Can we use both jQuery and AJAX together?
Ans: yes

27).Tell the name of jQuery method which is used to perform an asynchronous HTTP request?
Ans: jQuery.ajax()

28).What is the use of jquery load() method?
The jQuery load() method is a powerful AJAX method.
The load() method loads data from a server and puts the returned data into the selected element without reload the complate page.
Ex:The following example loads the content of the file "demo_test.txt" into a specific <div> element

29).Can we use our own specific charactor in the place of $ sigh in Jquery?
Ans: Yes
You can also create your own shortcut very easily. The noConflict() method returns a reference to jQuery, that you can save in a variable, for later use. Here is an example:
var vikas = $.noConflict();
    vikas("p").text("jQuery is still working!");

30).Name the 5 Jquery events?
jQuery Events
jQuery click() event.
jQuery dblclick() event.
jQuery mouseenter() event.
jQuery mouseleave() event.
jQuery mousedown() event.
jQuery mouseup() event.
jQuery hover() event.
jQuery focus() and blur() events.

Please must give your feedback...
Click on the following link to DOWNLOAD .PDF FILE
12-10-2012, 11:19 PM (This post was last modified: 08-01-2013 09:36 AM by vikas.ahlawat.)
Post: #1
Find all posts by this user
Quote this message in a reply
Hey guys..
Which contain 20 questions....
31).What is difference between jQuery's ready and holdReady?
jQuery's ready is an event which gets triggered automatically when DOM is ready while holdReady is a signal/flag to hold this triggering. holdReady was included in 1.6 version and it works only if used before the execution/triggering of ready event. Once ready event is fired, it has nothing to do. It is useful in dynamically loading scripts before the ready starts. It release ready event execution when used with a true parameter.

32).What is Jquery $.ajax() method?
The Jquery ajax() method is used to perform an AJAX (asynchronous HTTP) request.

04-13-2013, 01:09 PM (This post was last modified: 07-05-2013 04:17 PM by vikas.ahlawat.)
Post: #2
Find all posts by this user
Quote this message in a reply
Sponsor Ads

Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  TOP 100 SQL SERVER INTERVIEW QUESTIONS QUERIES EXAMPLE PDF vikas.ahlawat 0 32,842 09-05-2014 07:28 AM
Last Post: vikas.ahlawat
  TOP 10 MICROSOFT INTERVIEW QUESTIONS ANSWER | GLASSDOOR vikas.ahlawat 0 9,477 05-15-2014 10:47 PM
Last Post: vikas.ahlawat
  FUNNY .NET INTERVIEW QUESTIONS BY Shivprasad Koirala vikas.ahlawat 0 12,574 04-29-2014 09:44 PM
Last Post: vikas.ahlawat
  HR Interview Tips for Freshers and Experienced PDF preet.ahlawat 0 6,780 04-23-2014 04:59 PM
Last Post: preet.ahlawat
  Mainframe Interview Questions and Answers PDF vikas.ahlawat 0 3,509 03-28-2014 12:36 PM
Last Post: vikas.ahlawat
  Interview QuestionsTips for Babysitters & Nannies PDF vikas.ahlawat 0 3,315 02-25-2014 04:45 PM
Last Post: vikas.ahlawat
  ASP.NET Web.config File related Interview Questions for Fresher and Experienced vikas.ahlawat 0 33,069 01-28-2014 06:36 PM
Last Post: vikas.ahlawat
  Big Data & Hadoop Interview Questions and Answers for Experienced vikas.ahlawat 0 16,582 01-27-2014 08:05 PM
Last Post: vikas.ahlawat
  Objective Type : Tricky SQL Queries Interview Questions and Answers | Latest vikas.ahlawat 0 29,319 01-21-2014 06:01 PM
Last Post: vikas.ahlawat
  Most Important Australian Student VISA's Interview Questions Answers vikas.ahlawat 0 3,877 01-05-2014 12:42 PM
Last Post: vikas.ahlawat

Forum Jump:
Sponsor Ads
Most Popular Posts
Jquery Interview Questions & Answers
Create 3 Tier/Layer Architecture MVC
Create N-Tier/Layer Architecture View State Interview Questions
Razor View Engine Interview Q&A
Create Procedure in 5 minute for complete database State Management Interview Q&A
Connect with us

User(s) browsing this thread: 1 Guest(s)