+ 7

What are the major differences between JavaScript and jQuery?

I intend to build a dynamic website using Drupal CMS. Some webpages need to be dynamic. and I am learning JavaScript to make them. should I also learn jQuery for this? can someone give examples of jQuery and JavaScript uses ?

29th Jan 2017, 8:08 PM
Yaswanth Tippireddy
Yaswanth Tippireddy - avatar
17 Respuestas
+ 16
Look at it in a similar light to a steering wheel (jQuery) and the car (JS). Without a steering wheel the car is much more cumbersome to turn, not impossible, but you'd need to expend more effort. The steering wheel itself cannot move you and your luggage around though, it needs the car to do that. In the same way jQuery is just a collection of pre-made parts in JS which you call so that you can do certain things easier than you would otherwise have done by implementing them yourself. I.e. it's like getting a steering wheel for your car instead of building one yourself. That is basically what all sorts of libraries in nearly all languages are ... collections of pre-made code which you can then call to do specific actions for you instead of you needing to re-invent all that code yourself. In particular jQuery helps you to interoperate with the different parts of a web page, perform actions on specific events, send/receive data without needing to reload the entire page, etc. Those you could have done through basic JS, just that you'd need reams of extra code where JQ tends to turn it into a handful of lines instead. Another thing which JQuery does for you is to handle the inconsistencies a browser may have - this used to be a big headache especially with Internet Explorer. Also, just like you can get different sizes, shapes, colours, finishes, etc. of steering wheels, you get alternatives to JQuery. Popular JQuery alternatives. They all still work on top of JS, it's just that you reuse a different set of pre-made code to do the same stuff.
29th Jan 2017, 8:45 PM
Alex
Alex - avatar
+ 12
jquery is a javascript library that makes our life easier instead of dealing with pure javascript
30th Jan 2017, 5:32 PM
Fady M. Huwaidy
Fady M. Huwaidy - avatar
+ 11
JS is a programming language while JQuery is a library (framework) and is included in JS to make things easier. ✌
31st Jan 2017, 9:17 AM
Jihad Naji
Jihad Naji - avatar
+ 10
as far as I know jquery is a framework for make every things easier for javascript programmer
29th Jan 2017, 8:31 PM
Navid Tak
Navid Tak - avatar
+ 7
with jquery, long scripts that you would need to type is already done for you. you just need to tell the application where to look. for instance to hide an element with pure javascript you would need to select the element: var demo = document.getElementById('demo'); then hide it like this: demo.style.display = none; with jquery: $('#demo').hide(); c lean, simple, beautiful.
31st Jan 2017, 2:48 PM
G. keng
G. keng - avatar
+ 3
Just think jQuery as Javascript library which we have to include at the beginning of program to make some functions easier just like including header file in case of C programming..
31st Jan 2017, 4:40 AM
Sandeep Malaviya
Sandeep Malaviya - avatar
+ 3
I think now its clear to you
31st Jan 2017, 12:41 PM
Rakibun Atid Zihad
Rakibun Atid Zihad - avatar
+ 3
jQuery is one of the library in JavaScript..
31st Jan 2017, 8:51 PM
SUMANTH VENKATA SAI KRISHNA Manduru
SUMANTH VENKATA SAI KRISHNA Manduru - avatar
+ 2
folks said is correct
31st Jan 2017, 10:51 AM
Mahesh J
Mahesh J - avatar
+ 2
JavaScript makes the page work. EVERYTHING works within JavaScript. However, JavaScript sets some restrictions. Since any reference that is not reserved as a keyword and isn't defined in the same line is counted as a variable, then JavaScript cannot use a special reserved character like jQuery does. Example: #("someElement").someCommand; //Produces: Uncaught ReferenceError: # is not defined So, jQyery was created to GIVE JS the ability to be easier. Ex. 1: document.getElementById("whatever"); becomes $("#whatever") Ex. 2: With JS, to fade an element out, you have to set an Interval of 100 ms w/ a function subtracting 0.1 opacity. But, with jQuery, it's: $("#whatever").fadeOut(1000);
1st Feb 2017, 12:40 AM
Jayden Webb
+ 1
Consider Jquery a framework, which let you to use javascript but in a different way, cause Jquery is just a framework based on javascript, and jquery isn't a language. Jquery offers a simple understand of javascript and its utility.
31st Jan 2017, 12:07 PM
Oussama Jaaouani
Oussama Jaaouani - avatar
+ 1
I don't have questions I wrote a few of them down yesterday in fact and I do not have that piece of paper with me however I am waiting on someone who is going to be with the shortly and I'm going to shower up and gather some things and that will be one of them and I will contact you ask you because at the end of the day the longer you know me the more you will realize that I am a free-thinking esoteric enigmatic machine that you will never completely figure out and sometimes I'm 10 steps ahead of you and I seem like I'm 10 steps behind this situation has been contemplated my mind dominated by my intuition and if you answer these questions correctly it will shed light to a situation that is full of Doubt negativity and angry Vives all of which I refused to take part of I think for myself I take suggestions but I only take them from those that I trust and those that I trust have proven that trust every step of the way and I have no problem will forward you that same respect whatsoever however you have to respect the fact that I will protect my family my life my friends because that is and always will be what I wear my sleeve
31st Jan 2017, 2:13 PM
David
+ 1
Jquery is the JavaScript library where you can find readymade complex codes which is written on JavaScript and can be downloaded from internet and all you have to know is how to implement those codes on you application.
31st Jan 2017, 6:50 PM
Jugal Dumka
Jugal Dumka - avatar
+ 1
JS is a language, JQuery is a framework tool made it from JS.
1st Feb 2017, 1:23 AM
Antonio Trejo
Antonio Trejo - avatar
+ 1
jQuery is JavaScript library, i.e. the same language. The difference is jQuery contains cross browser tools to operate with dynamic content on client side. Without jQuery you have to implement same task in different JavaScript code for each browser you want to be supported.
1st Feb 2017, 1:28 AM
Alexander
+ 1
Major differences between Javascript and jQuery are; 1) Javascript is a programming language, while jQuery is a Javascript library. 2) Javascript codes are longer than jQuery codes. (i.e, jQuery is a simpler way to write Javascript) Example of Javascript: document.getElementById("myId") Example of jQuery: $("myId")
24th Feb 2017, 3:56 PM
Iliyas Damilola
Iliyas Damilola - avatar
- 2
minint-E7TTBJN AKA Ninint-50103k5 has followed me to school and into a library yeah there's a good chance he could be in for a world of hurt because he may be good at being on top but I don't think he realizes Norton Security Microsoft it's a private it guys here standing on top of that I've never even seen before I thought I seen everything
1st Feb 2017, 12:14 AM
David