My HTML is something like this
<div id="mydiv" class="common">
<input type="text" id="text1" value="" />
<input type="text" id="text2" value="" />
</div>
I am assigning a function on the onclick event of the textbox like this
$(document).ready(function() {
$(".common input").click(function() {
//////// What I am trying to do is access the id of its parent
// in this case it is "mydiv"
alert($(this:parent).attr('id'));
});
But it is not working