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

How to create a management system with Cosmic JS and Angular

Windows 10 Terminal Error: EPERM Fix

3 Things You Can Learn From Experienced Polyglot Developers

React dashboard tutorial: learn how to get started with an admin interface built with React.js

Spring Security using JWT Token

Overriding Inheritance in New Types Using Omit and Keyof in Typescript

1Hive UI Integration Update Notes

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

The Future Is Triple Top Line

🕊️-Taking Flight-🕊️

Lonesome…

When to Use a UV Filter on Your Camera Lens