are there any problems mixing my code with standard javascript and jquery? Will things conflict? Would I be unable to use standard javascript within jquery calls?
5 Answers
jQuery is framework for JavaScript
This means that if you use jQuery, you use JavaScript at the same time.
So no, there will be no issues if you put JavaScript inside the code that already uses jQuery, because you add nothing new / conflicting. Because you already are using JavaScript within your code.
Comments
jQuery does a good job of keeping itself compartmentalized within the jQuery (or $) object, so it plays well with existing JavaScript, and even with other JS APIs. The only thing I can think of that you should really look out for is if you use $ elsewhere (for example, if you use PrototypeJS). In that case, you can use jQuery's noConflict.
Comments
The only issues you will find is if your code overwrites the base prototypes. Otherwise your code will work fine with javascript libraries and frameworks including JQuery.
4 Comments
window, or document, or jQuery, or Array, but still saying "they play very nice" is far from being true. jQuery does not "play" with JavaScript nicely, it is JavaScript. It is like extension based on JavaScript, written on top of it. If you use some other JavaScript, you can still break existing JavaScript, but it is true with most programming languages. Anyway, how would you like to write code that uses jQuery, but does not use "standard JavaScript"? Please exaplain.
:p