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