Display item id

I use this operator alert(el.parent().next());

But I get [object] [object] as a warning. How to display item id?

+3
source share
3 answers

You tried?

alert(el.parent().next().attr("id"));
+5
source

You should get your id attribute:

alert(el.parent().next().attr("id"));
0
source
el.parent().next().attr("id")
0
source

Source: https://habr.com/ru/post/1747024/


All Articles