Javascript jquery删除父cur.element的父元素

Javascript jquery删除父cur.element的父元素,javascript,jquery,Javascript,Jquery,嗨,我不移除parnet 我的代码: <div class="prdctfltr_add_scroll"> <div class="prdctfltr_checkboxes"> <label class="prdctfltr_ft_"> <input type="checkbox" value=""> <span> <img src="" onerro

嗨,我不移除parnet

我的代码:

  <div class="prdctfltr_add_scroll">
   <div class="prdctfltr_checkboxes">
      <label class="prdctfltr_ft_">
        <input type="checkbox" value="">
         <span>
            <img src="" onerror="delNoneOptionFilters(this)" class="product_filter_none_option">
            <script>function delNoneOptionFilters( x ){ $(x).closest('label').remove; }</script>
         </span>
      </label>
      <label class="prdctfltr_ft_popularity">
        <input type="checkbox" value="popularity">
        <span>Popularity</span>
      </label>
      <label class="prdctfltr_ft_rating">
        <input type="checkbox" value="rating">
        <span>Average rating</span>
      </label>
      <label class="prdctfltr_ft_date">
        <input type="checkbox" value="date">
        <span>Newness</span>
      </label>
        <label class="prdctfltr_ft_price">
        <input type="checkbox" value="price">
        <span>Price: low to high</span>
      </label>
      <label class="prdctfltr_ft_price-desc">
        <input type="checkbox" value="price-desc">
        <span>Price: high to low</span>
      </label>
   </div>
</div>
我想删除label class=prdctfltr\u ft\u请尝试以下操作:-

function delNoneOptionFilters( x ){ $(x).parents('label').remove(); }
remove不是一个属性,它是一个必须像$x这样使用的函数。最近的“标签”。remove。 函数delNoneOptionFilters x{ $x.最近的“标签”。移除; } 删去 人口平均比率新价格:从低到高价格:从高到低