Display the Element ID
I am using this statement alert(el.parent().next());
But I am getting [object] [object] as an alert. How do I displa开发者_如何学运维y the ID of the element?
Have you tried?
alert(el.parent().next().attr("id"));
You must get its id attribute:
alert(el.parent().next().attr("id"));
el.parent().next().attr("id")
精彩评论