title: jQuery scope for parent ID
body: <p>I was wondering how I would go about implementing this:</p>
  
  <pre><code>&lt;div id="1234345" class="item"&gt;
  &lt;script type="text/javascript"&gt;
  function getItem() {
  alert($(this).attr('id')); // I want this to be 1234345
  }
  getItem();
  &lt;/script&gt;
  &lt;/div&gt;
  
  &lt;div id="1239345" class="item"&gt;
  &lt;script type="text/javascript"&gt;
  function getItem() {
  alert($(this).attr('id')); // I want this to be 1239345
  }
  getItem();
  &lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Neither of them work, but I need to make sure that both sections have exactly the same code, but return the right ids.</p>