Wednesday, 2 January 2013

Jquery interview questions

What is Jquery ?
Jquery is Java Script library which was released in 2006. Jquery is equally important  for the web designers and web developers. Jquery add cool effects to webpage that is why Jquery is helpful for web designers and  it add Ajax interaction to web page so it is helpful for web developers also. Jquery is also cross browser compatible.

Q1)  What is dollar sign ($) sign in Jquery ?
         Dollar Sign is nothing but it's an alias for jquery.

Q2)  Explain the features of jquery ?
        1. Effects and animations
        2. Ajax
        3. Browser compatibility
        4. Css manipulation
        5. Events

Q3)  Why Jquery is better than javascript ?
        1. Cross-browser Compatibility
        2. Simple code than javascript
        3. jquery is fast, lightweigth javascript library.
        4. We can add cool animations and effects with jquery.
        5. CSS3 Selectors Compliant

Q4)  Can we use Jquery together with ajax ?
        Yes.

Q5)  Jquery methods used to add effects ?
        1. Show()
        2. Hide()
        3. Toggle()
        4. FadeIn()
        5. FadeOut()


Q6)  which jquery methods is used to hide selected elements ?
         .hide() 


Q7)  what is document.ready() function?
         The ready even occur when the DOM(Document Object Model) has been loaded. When we put 
          some jquery code inside document.ready() function then it is immediately executed when the 
          document is  ready. So it is better to put jquery code inside document.ready() function.


Q8)  what is jquery selector?
         jQuery selectors allow you to select and manipulate Html element, with query selectors you
         can find elements based on their id, classes, types, attributes, values of attributes and much more.


Q9)  Types of  jquery selectors?
         1.  Element selector
         2. #id selector
         3. .class selector


Q10)  Which jquery selector is used to select all elements ?
           $(*)  asterisk selector is used to select all elements.


Q11)  Why element selector is used ?
            Element selector selects elements based on their tag name. Syntax: $("h1")
     

Q12)  Why #id selector is used ?
           #id selector is used to select #id from html document and apply some jquery on it.
           Syntax: $("#idname")


Q13)  Why .Class  selector is used ?
           .Class selector is used to select .Class from html document and apply some jquery on it.
           Syntax: $(".Classname")




        
       






No comments:

Post a Comment