我应该使用哪种 jquery 方法来获取“关联的”高层元素?

问题描述 投票:0回答:1
jquery
1个回答
0
投票

使用

.closest()
,然后使用
.find()

$(this).closest('.cart-item--content.cl-plate-cart-item').find('.discountData').text();
© www.soinside.com 2019 - 2024. All rights reserved.