title: HTML Element Object vs Object
body: <p>Can anyone please help me why I couldn't get the right result for this code?</p>
  
  <pre><code>    Javascript:
      var items2 = $("#quadrant1");
      var coords = items2.getAttribute('coords').split(',');
  
      HTML:
      &lt;map id="square_map" name="square"&gt;
          &lt;area id="quadrant1" shape="poly" coords="206,10, 300,10, 388,10"&gt;&lt;/area&gt;
      &lt;/map&gt;
  </code></pre>
  
  <p>I've checked the typeof of items2 and it's just OBJECT, and doesn't appear to get the right HTML AREA OBJECT. All I'm after is to get the element object so I can do further manipulations like in the example to get its coords attribute value.</p>
  
  <p>How do I know that it should be [object HTMLAreaObject]? I'm not sure really, but that's the typeof "this" in</p>
  
  <pre><code>$('#square_map").bind("click",function(){
  var coords = this.getAttribute('coords').split(',');
  ... });
  </code></pre>
  
  <p>and it's doing its job properly with that said object. Any help would be appreciated...a lot! Thanks in advance</p>