jQuery uses the script like this:
function remove() {
jQuery("*", this).add([this]).each(function () {
jQuery.event.remove(this);
jQuery.removeData(this);
});
if (this.parentNode)
this.parentNode.removeChild(this);
}
As far as I understand the code is removing the element if the element has parentNode but I wanted to know why does it removes the element which have no parentNode:
$('html').remove();//html has no parentNode but html is removed
Sorry, if I'm one that couldn't understand this script, please make my concept clear. Thank you.