Is jQuery Unavoidable?

$ (document).ready(function( ){
$(“#div2”).find(“*”).css({“color”:”red”, “border”:“5px solid red”});
});

A Brief Look

var hiddenBox = $( “#banner-message” );
$( “#button-container button” ).on( “click”, function( event ) {
hiddenBox.show();
});
function hiddenBox(“#banner-message”){
(“#button-container button”).addEventListener(‘click’, (e) => e.preventDefault(show(“#banner-message”))
}

Learn More

When To Use jQuery

( “a” ).click(function( event ) {

event.preventDefault();

$( this ).hide( “slow” );

});

To jQuery or Not jQuery

jQuery way vs DOM way — change content of an element; ex from flaviocopes.com
  • if the project relies on it
  • some libraries depend on jQuery (like Bootstrap; but Bootstrap 5 is designed to be used without jQuery *gasp* )
  • some templates and plugins require it
  • if, for some reason, still need to support older browsers
  • is useful for animations if you lack CSS skills

Conclusion

--

--

--

Certified Sommelier and Flatiron School Software Engineering Grad

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Simple Fullstack CRUD App With Rails, React &Redux Part 2

What is the DOM & Virtual DOM?

Build GitHub Actions with Typescript

Beginner Guide to Creating and Hosting a Simple Digital Resume (React)

Data Structures & Algorithms: Practice #1

When to say “No” as a Software Engineer?

Creating a queue using Javascript arrays and classes.

How to mark and drag marker in google map using java script

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jonelle Noelani Yacapin

Jonelle Noelani Yacapin

Certified Sommelier and Flatiron School Software Engineering Grad

More from Medium

What happens when we execute an gcc command ?

Virat Kohli — One of the Finest Captain of All Time

Nevada women’s basketball has third straight win after defeating Cal Poly

WHAT IS ALL ABOUT 5G NETWORK