title: Get as object using id in jquery
body: <p>I have a method which take obj as parameter. I can't change the signature and I wan to reuse it. I have to send an element as object to this parameter so not sure how to do it. Can anyone show me?</p>
  
  <pre><code>function someUsefulFunction(obj) {
    var id = obj.id;
    //do other stuff
  }
  
  {
    ...
    var myElement = $('#myElement');
     someUsefulFunction(myElement); //getting error "TypeError: obj.id is undefined"
    ...
  }
  </code></pre>