jQuery vs JavaScript

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.

For more than 10 years, jQuery has been the most popular JavaScript library in the world.

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


Removing HTML Elements

Remove an HTML element:

jQuery

$("#id02").remove();

JavaScript

document.getElementById("id02").remove();


Get Parent Element

Return the parent of an HTML element:

jQuery

myParent = $("#02").parent().prop("nodeName"); ;

JavaScript

myParent = document.getElementById("02").parentNode.nodeName;



Login
ADS CODE