1. Question:What is the function of jQuery? 

    Answer
    jQuery is a new kind of JavaScript Library. It does perform so many different functions such as HTML document traversing, event handling, animating e.t.c.

    1. Report
  2. Question:What are the three building blocks for selecting element used in jQuery? 

    Answer
    Three building blocks while selection elements in a given document:
    A)	Tag Name     B) Tag ID     C) Tag Class

    1. Report
  3. Question:Write the functions of hasClass and html methods. 

    Answer
    hasClass(class): Returns true if the specified class is present on at least one of the set of matched elements.
    Html(): Get the html contents (innerHTML) of the first matched element.

    1. Report
  4. Question:Which methods are used to add content before and inside of every matched element? 

    Answer
    before(content) method is used to add content before each of the matched element.
    appendTo(Seloctor) method is used to inside append all of the matched elements to another, seicified set of element.

    1. Report
  5. Question:What is the function of serializeArray() method? 

    Answer
    serializeArray() method is a useful function for getting values of the form elements. This function turns all the elements into a JavaScript object.  Given example below….
     Var data = $(‘form:first’).serializeArray();

    1. Report
  6. Question:Write the differences between load and get methods. 

    Answer
    Both methods are similar expect for the fact that $(selector).load() is a method, which means it acts on a set  of elements specified by a selector, On the other hand $.get() is global method that has an explicity defined callback function.

    1. Report
Copyright © 2024. Powered by Intellect Software Ltd