Curriculum
Course: JavaScript Basic
Login

Curriculum

JavaScript Basic

JSHome

0/216
Text lesson

jQuery DOM

jQuery vs JavaScript

jQuery, created by John Resig in 2006, was designed to resolve browser incompatibilities and simplify tasks like HTML DOM manipulation, event handling, animations, and AJAX.

For over a decade, it remained the most popular JavaScript library globally. However, since the release of JavaScript Version 5 in 2009, many of its features can now be accomplished with just a few lines of native JavaScript.

Removing HTML Elements

Delete an HTML element.

jQuery

$(“#id02”).remove();

JavaScript

document.getElementById(“id02”).remove();

Get Parent Element

Retrieve the parent of an HTML element.

jQuery

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

JavaScript

myParent = document.getElementById(“02”).parentNode.nodeName;