list_product
如果单击该特定delete
类,我将尝试删除整个块。我对 jquery 很陌生,还在学习。
<div class='list_product'>
<div class='row'>
<div class='delete'>x</div>
<div class='title'>Standing Fan</div>
</div>
</div>
<div class='list_product'>
<div class='row'>
<div class='delete'>x</div>
<div class='title'>Standing Fan 2</div>
</div>
</div>
<div class='list_product'>
<div class='row'>
<div class='delete'>x</div>
<div class='title'>Standing Fan 3</div>
</div>
</div>
<div class='list_product'>
<div class='row'>
<div class='delete'>x</div>
<div class='title'>Standing Fan 4</div>
</div>
</div>
查询:
$('.delete').click(function() {
$(this).find('.list_product').remove();
});
不管用。我可以知道为什么以及如何解决它吗?谢谢