title: Get reference of window object from a dom element
body: <p>I have a javascript code like this</p>
  
  <pre><code>var element = $("elementId");
  </code></pre>
  
  <p>I got the reference to the element (which is a div). </p>
  
  <p>Now I need to get the reference to the window in which this div element resides. But the problem is, here the $ is passed from a different window. So now the element resides in a different window. </p>
  
  <p>How to get reference to that window object which contains this div element? Pls Help.</p>