jQuery CSS Styles

jQuery was created in 2006 by John Resig. It was designed to handle Browser Incompatibilities and to simplify HTML DOM Manipulation, Event Handling, Animations, and Ajax

jQuery vs JavaScript

jQuery was created in 2006 by John Resig. It was designed to handle Browser Incompatibilities and to simplify HTML DOM Manipulation, Event Handling, Animations, and Ajax.

However, after JavaScript Version 5 (2009), most of the jQuery utilities can be solved with a few lines of standard JavaScript:

Hiding HTML Elements

Hide an HTML Element:

jQuery

myElement.hide();

Try it Yourself »

JavaScript

myElement.style.display = "none";

Try it Yourself »

Showing HTML Elements

Show an HTML Element:

jQuery

myElement.show();

Try it Yourself »

JavaScript

myElement.style.display = "";

Try it Yourself »

Styling HTML Elements

Change the font size of an HTML element:

jQuery

$("#demo").css("font-size","35px");

Try it Yourself »

JavaScript

document.getElementById("demo").style.fontSize = "35px";

Try it Yourself »