[英]How do I get the id's of children of siblings using jquery
I am using this code and it outputs the correct objects, but I am unable to get only the id from these objects. 我正在使用此代码,并且它输出正确的对象,但是我无法仅从这些对象中获取ID。 Here is the code:
这是代码:
console.log($(this).parent().parent().siblings().children());
Output is: 输出为:
[div#first-example.box-prop.top-widget, div#second-example.box-prop.top-widget, div#third-example.box-prop.top-widget, prevObject: init[3], context: i.fa.fa-times.close-x] [div#first-example.box-prop.top-widget,div#second-example.box-prop.top-widget,div#third-example.box-prop.top-widget,prevObject:init [3],上下文:i.fa.fa-times.close-x]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.