Can we use combination of JavaScript and jqeury in same webpage?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

Can we use combination of JavaScript and jqeury in same webpage??

Is it possible to write JavaScript code that have some of the functions from jquery...?

4th Feb 2019, 10:33 AM
Sujay Hadadare
Sujay Hadadare - avatar
5 Answers
+ 5
All I say is If the code and usage are different then you can use together. No problem. But, I would not recommend inserting random JQuery function into JavaScript function or class or vice-versa. And Not mix DOM manipulation, It will just get messy. Keeping Separate for separate task is good.
4th Feb 2019, 11:54 AM
Niush
Niush - avatar
+ 5
Thanks... 😊
4th Feb 2019, 11:56 AM
Sujay Hadadare
Sujay Hadadare - avatar
+ 4
But what if....we only add some handy functions from jquery ... For... Animation etc... It will become.. easier to... Code.
4th Feb 2019, 11:24 AM
Sujay Hadadare
Sujay Hadadare - avatar
+ 3
Yes you can use both in the same page with no problem. But I would not recommend that as it might get messy and also you might want to see: www.youmightnotneedjquery.com
4th Feb 2019, 11:13 AM
Niush
Niush - avatar
+ 2
Yes, it's possible. If you're the sole maintainer of the code base, do whatever you want! 🤓 If you expect anyone else to look at the code some day, keep it as tidy as possible.
6th Feb 2019, 12:29 PM
Janning⭐
Janning⭐ - avatar