title: Removing HTML Element by Id
body: <p>I am using the following code to remove an element from the DOM tree: </p>
  
  <pre><code> function onItemDeleted(name) {
  
             $("#" + name).remove();                       
  
         }
  </code></pre>
  
  <p>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: </p>
  
  <p>BODY => DIV => TABLE => TR (found) </p>
  
  <p>If I find the parent of TR which is TABLE would the search be like this: </p>
  
  <p>TABLE -> TR </p>
  
  <p>I don't know if above will be true since I think search will always start at the root node. </p>