0
JQuery
Is there any difference between JQuery and JavaScript? Can I learn JQuery, JavaScript or both and if both, which one should I learn first?
2 ответов
+ 3
JQuery is, in form and factor (I just wanted to say that :P), a JavaScript Library.
JQuery helps to shorten-down, what could be a 5-line piece of code: to a 1-line, 7-character 'query'. *boom*
But, learning the essentials of the Base Language, this being JavaScript, is Very Important! JQuery handles with the DOM and expands upon the JavaScript Capabilities of that area.
That is not to say that you should immediately jump to JQuery after learning JavaScript!
JavaScript, is versatile and expandable - able to be built upon.
JQuery, is more-in-depth whilst remaining... well, 'native'.
An example of JavaScript to JQuery Conversion...
var el {
document.getElementById("demo")
}
el.write("This is the element 'demo'!")
$(demo).html("This is the element 'demo'!");
Okay, so I may have lied about the 8-character line, but you get where I'm going with this; JQuery is similar to JavaScript (as it branches from it) but Shorter but more difficult I suppose. The syntax is a bum-biter :3
So I hope I've explained the key-differences between the Language and the Library. And if you want, learn both! Remember to master the Base first. The base being JavaScript. :)
Good Luck!
0
@ghostwalker13 Thanks a lot