Reputation: 4347
Jquery parent selector is not working in IE8..It's working with other browsers(chrome,firefox,opera,safari)
I'm using it like :
comment = $(this).parent().parent().parent().find(".commentWrapper");
Any idea?
--Edit--
Sorry for the misleading Turns out error is next line ;
postId = $(this).parent().parent().find('input[name = "postId"]').val();
And IE Developer tool shows this error:
Object doesn't support this property or method
But if i declare postId like var postId, it's working fine.. But I didnt understand what is the problem actually?
Upvotes: 1
Views: 4115
Reputation: 7653
if you know parent selector, better to use parents('selector'). http://api.jquery.com/parents/
Upvotes: 1