Jul 21, 2013

jQuery Interview Questions - Part 1

Q: What is jQuery?
jQuery is a light weight JavaScript library which provides fast and easy way of HTML DOM traversing and manipulation, event handling, and client side animations, etc. One of the greatest features of jQuery is that it supports an efficient way to implement AJAX applications because of its light weight nature and make normalize and efficient web programs.

Q: Is jQuery a library for client scripting or server scripting?
jQuery is client scripting library.

Q: Which sign does jQuery use as a shortcut for jQuery?
$(dollar) sign.

Q: What does dollar Sign ($) means in JQuery?
Dollar Sign is nothing but it’s an alias for JQuery. Take a look at below jQuery code
$(document).ready(function(){  
});

Q: What are jQuery Selectors? 
jQuery Selectors are used to
  • find out DOM elements.
  • find the elements by ID, Class, Tag Name etc.
jQuery selectors always start with dollar sign and parenthesis : $()

Some examples of jQuery Selectors
Select element by tag name
$(div)
This will select all the div elements

Select elements by id
$(#mydiv)
This will select div with id "mydiv"

Select elements by class
$("clsdiv")
This will select all the div elements with class "clsdiv"

Q: What are different type of selectors in jQuery?
There are 3 types of selectors in jQuery
  • CSS Selector
  • XPath Selector
  • Custom Selector

Q: Does the jQuery html() method work for both HTML and XML documents?
jQuery html() only works for HTML.

Q: What does $("div") will select?
It will select all the div element in the page.

Q: What does $("div.parent") will select?
All the div element with parent class.

Q: What is the name of jQuery method used for an asynchronous HTTP request?
jQuery.ajax()



Next >>

    Choose :
  • OR
  • To comment
1 comment:
Write Comments

Probabilmente come studente universitario ti troverai a scrivere una o più tesi per il tuo analogo esame di fine carriera. Ma di cosa si tratta in particolare? Scopriamo quali sono i pro dei tool per riscrivere testo che troverai online. Per strumento di parafrasi si intende un tool online che si occupa di parafrasare in maniera immediata frasi oppure interi paragrafi. Questa attività si svolgerà interamente su internet e non lascerà alcuna traccia di plagio