I need a little help with removing the href element of the below 'a' element:
<div class="carousel__tape-item js-product">
<div class="sale-content__cell">
<a href="www.website.com"></a>
</div>
</div>
This is my attempt but it doesn't work:
var a = $(".carousel__tape-item .sale-content__cell");
a.find("a").removeAttr("href");
Any ideas?
答案 0 :(得分:1)
您想对jquery
使用多选择器语法 $(document).ready(function() {
$('.carousel__tape-item.js-product').find('a').removeAttr('href');
});