Why we need go for Jquery instead of Javascript.

Posted by Karthik2010_Mca under Interview Questions on 3/18/2013 | Points: 10 | Views : 1539 | Status : [Member] | Replies : 2
Hi,

Why we need go for Jquery instead of Javascript.

Thanks
Karthik

Karthik


Responses

Posted by: Jayakumars on: 3/18/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

JQuery Library plugins most most advantages compare with Javascript

then we coded customized the jQuery then comfortable for developers easily used to developers.

for ex: jscript we are coded 10 lines but same concept we are achieve jquery 2 or 3 lines so.

Mark as Answer if its helpful to you

Karthik2010_Mca, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Somu475 on: 3/19/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,

jQuery is a library of JavaScript Functions.

jQuery is a "write less, do more" JavaScript library.

Example:

Hiding 'div' using JavaScript:

divs = document.getelementByTagName('div');

for (i=0;i<divs.length;i++)
{
divs[i].style.display=none;
}


Hiding 'div' using jQuery:

$("div").hide();


jQuery selectors allow you to select HTML elements (or groups of elements) by element name, attribute name or by cssclass name.

$("p")          - selects all <p> elements. 

$("p.intro") - selects all <p> elements with class="intro".
$("p#demo") - selects the <p> element with id="demo".


-Somu

Karthik2010_Mca, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response