title: Use JQuery-functions on a DOM-element
body: <p>I do believe this is a very stupid question and there's a very simple answer for it, but I didn't found a solution:</p>
  
  <p>I have the following JavaScript function:</p>
  
  <pre><code>function setStatus(order, operation, status, elem){
      elem.parent().$(".active").removeClass("active");
      elem.addClass("active");
  }
  </code></pre>
  
  <p>Elem is Image-element in my HTML which I'm sure is the right one by checking it's type with <code>alert(elem);</code></p>
  
  <p>The error I get is exactly what I expected:</p>
  
  <blockquote>
    <p>Object #&lt; HTMLImageElement> has no method 'parent'</p>
  </blockquote>
  
  <p>I already know this is because elem is a DOM-element and not an JQuery-element which means that it's not possible to use functions like <code>parent()</code> and <code>addClass()</code>. How can I use all JQuery-function on my elem? Is there a way to convert a DOM-element to a JQuery-element? I found this question on the internet many times with <code>this</code> that should have been <code>$(this)</code>, but <code>$(elem)</code> doesn't seem to work. </p>