title: How to get div ID JQUERY
body: <p>I want to get the ID or class if the link button is clicked</p>
  
  <pre><code>&lt;div class="pane alt" id="a"&gt;
  &lt;h3&gt;Nick says:&lt;/h3&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi malesuada
  &lt;p&gt;&lt;a href="#" class="btn-delete"&gt;Delete&lt;/a&gt;  &lt;a href="#" class="btn-unapprove"&gt;Unapprove&lt;/a&gt;  &lt;a href="#" class="btn-approve" style="display:none"&gt;Approve&lt;/a&gt;
  </code></pre>
  
  <p></p>
  
  <p>the code that i created to process the clicked button is this which resulting "undefined"</p>
  
  <pre><code>$('.btn-unapprove').click(function(){
  
      var id = $(this).attr('id');
      alert(id); 
  
  });
  </code></pre>
  
  <p>so is it possible to get the div id if the link is clicked ? if so how to to do it?</p>