Do you need jQuery in your JavaScript projects? Should you even learn jQuery at this point? jQuery came out in 2006. It was designed to handle Browser Incompatibilities and to simplify HTML DOM Manipulations, Event Handling, Animations, and Ajax. For more than 10 years, jQuery has been the most popular JavaScript library which made things easier for JavaScript developers. After JavaScript Version ES6 in 2015, most of what jQuery offers can be done with a few lines of standard JavaScript code.
jQuery may not be needed but it is still very popular JavaScript library. And it is not going anywhere. jQuery has got a best friend, named as WordPress. To completely ignore jQuery, you will have to ignore WordPress that you can not. In this tutorial, let's look at some of repetitive tasks that we do with jQuery and then see how vanilla JavaScript can do it. I will also share a shortcut that can replace jQuery with vanilla JavaScript code in your projects. You can do anything in vanilla JavaScript very easily what jQuery used to offer. Here are some of tasks done side by side in jQuery and in vanilla JavaScript.
In this tutorial we have discussed:
Are jQuery and JavaScript the same thing?
Difference between JavaScript and jQuery
jQuery alternative
jQuery to JavaScript Converter tools
Convert jQuery to JavaScript
jQuery vs JavaScript
Select Elements using jQuery and JavaScript
Remove HTML Elements using jQuery and JavaScript
Get Parent Elements using jQuery and JavaScript
Set Text Content using jQuery and JavaScript
Get Text Content using jQuery and JavaScript
Set HTML Content using jQuery and JavaScript
Get HTML Content using jQuery and JavaScript
DOM Ready or DOM Loaded in jQuery and JavaScript
Show Hide using jQuery and JavaScript
fadeIn fadeOut using jQuery and JavaScript
Add CSS code or styles using jQuery and JavaScript
Add Remove Classes using jQuery and JavaScript
Append Elements using jQuery and JavaScript
Always check when DOM is ready and put all or your scripts in it. Do this when working with vanilla javascript and jQuery. Not with ReactJS or such libraries and frameworks having different mechanism for that.
There are many ways to do a single thing. And here is the resource that will help you replace anything in jQuery to it's JavaScript alternative code. Go to you might not need jquery website. Search for the method in jQuery. You will find how to do it in vanilla JavaScript. But there is even more easy way. Search for jQuery to JavaScript Converter Tool. There are many online tools that can convert jQuery code into vanilla JavaScript code. There are many more jquery to javascript converter tools available to help you convert javascript code.
So, jQuery is great. Use it by all means where it makes your life easy. But it is always good to see how can you do things when you do not have jQuery in your project.
Thank You!
👍 LIKE VIDEO
👊 SUBSCRIBE
🔔 PRESS BELL ICON
✍️ COMMENT
Channel: / webstylepress
Website: https://www.webstylepress.com
FaceBook: / webstylepress
Twitter: / webstylepress
GitHub: https://github.com/webstylepress
#JavaScript #JS #jQuery #WebDevelopment #WebStylePress #DOM #vanillajs #vanillajavascript
On this page of the site you can watch the video online Replace jQuery with Vanilla JavaScript Code Easily | jQuery vs JavaScript with a duration of hours minute second in good quality, which was uploaded by the user WebStylePress 17 March 2022, share the link with friends and acquaintances, this video has already been watched 4,052 times on youtube and it was liked by 58 viewers. Enjoy your viewing!