15
I need to get the ID of the clicked-on div.
Now when I click on status class I an returned undefined id.
Here is my javascript code
jQuery(document).ready(function() {
$(".status").bind('click', $.proxy(function() {
var status = $(this).attr('id');
alert(status);
}, this));
});
and HTML
<div class="status" id="s_1">111111</div>
<div class="status" id="s_3">33333</div>
<div class="status" id="s_2">222222</div>
How should I get the correct id value?