Technical Articles

Difference between JavaScript and jQuery?

0 0
  •  JQuery is, a library of JavaScript code. 
  • JQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.
  • JavaScript is a language. jQuery is a library built with JavaScript to help JavaScript programmers who are doing common web tasks.
  • jQuery was written using JavaScript, and is a library to be used by JavaScript.
  • jQuery is a multi-browser (cf. cross-browser) JavaScript library designed to simplify the client-side scripting of HTML
  • jQuery is a wrapper of JavaScript, with much pre-written functionality.

JQuery is a framework for writing javascript tasks in a easier way. JQuery it is written in javascript. Also, I should mention that browsers parse only html and css files as also js scripts. Hence, all javascript frameworks (jQuery, AngularJS, etc) are written in javascript. They provide you the oportunity to write js code easier but under the hook they are all written in javascript.
Example:
Say we have the following input element
<input id="button1" type="button" value="clickMe"/> 
Also say that we want when someone click on the button to have an alert box showing to the user a ‘Hello’ message.
Then the code in javascipt would be:
document.getElemementById("button1").addEventListener('click', function(){ 
    alert("Hello");
});
Using JQuery the above would be written as follows:
$('#button1').click(function(){ alert("Hello"); });
Using JQuery makes things more clear.
As you can see all JQuery is, is JavaScript. 
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
× How can I help you?