I am using the following code to remove an element from the DOM tree:
function onItemDeleted(name) {
$("#" + name).remove();
}
Would this be bad for performance since I am not indicating any parent for the element. The element is a TR contained in a TABLE element. The DOM search for this element will start at the top which might be BODY. So would it be something like this:
BODY => DIV => TABLE => TR (found)
If I find the parent of TR which is TABLE would the search be like this:
TABLE -> TR
I don't know if above will be true since I think search will always start at the root node.