title: How to target the event that you click and use for offset
body: <p>I have several <em>div</em> elements. On the <em>mousedown</em> event I am getting the elements attribute that I clicked on and then using Jquery offset method,
  I can't seem to trigger the <code>$(elt)</code> properly, so that it picks up as Jquery.</p>
  
  <p>I am trying to use as least as possible of Jquery library as wan to get rid of it.</p>
  
  <p><em>offsetLeft</em> and <em>offsetTop</em> are both JavaScript properties that are defined on an HTML element. <em>offset()</em> is a jQuery method that requires a jQuery object. 
  I understood that all you need to is wrap the element like so <code>$(elt)</code>.</p>
  
  <p>I get error on the last line on JS before closing tag.</p>
  
  <pre><code> elementBlock.on('mousedown',function(e){
          var el = e.target.nodeName;
          var elt = e.target.getAttribute('id');
          console.log(elt); // i get the clean attribute
          console.log(el); // i get DIV
          elt.tmp.left = e.clientX - $(elt).offset().left;
  
  }
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code> &lt;div  id="elementBlock"&gt;
                    &lt;div id="blue-left"&gt;&lt;/div&gt;
                    &lt;div id="blue-right"&gt;&lt;/div&gt;
                  &lt;/div&gt;
  </code></pre>