I am having trouble getting an ID of an element. The codes work in FF and chrome but not IE. Can anyone help me about it? Thanks a lot
<td id='tdID'>
<img id='test' src='a.jpg' class='imgClass' />
</td>
jquery
$('.imgClass').click(function(){
ip=$(this).parent().attr('id');
//undefined in IE
console.log(ip);
})