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.
Delete an HTML element.
$(“#id02”).remove(); |
document.getElementById(“id02”).remove(); |
Retrieve the parent of an HTML element.
myParent = $(“#02”).parent().prop(“nodeName”); ; |
myParent = document.getElementById(“02”).parentNode.nodeName; |