如何让type="checkbox"不选中

如何让type="checkbox"不选中

$(function(){
  $(".item_list").each(function(){
    var radio_this=$(this).children('ul').children('li').children('span');
    radio_this.find('input').click(function(){
    var radioId=$(this).attr('name');
    radio_this.find('span').removeAttr('class') && $(this).next().find('span').attr('class', 'check_i');
    $(this).parent('span').parent('li').siblings('li').find('input').removeAttr('checked') && $(this).attr('checked', 'checked');
    // console.log($('input[type="radio"]:checked').val())
  })
  })

})

.check_i {
  width: 0.426667rem; 
  height: 0.426667rem;
  border-radius: 50%;
   position: absolute;
   top: 50%;
  margin-top: -0.213333rem;
     left: 50%;
   margin-left: -0.213333rem;
  background-image: url(../img/click_btn.png);
  background-size: 100% 100%;

 选中后改变背景图片即可

 

相关文章:

  • 2021-07-16
  • 2021-12-09
  • 2022-12-23
  • 2021-08-14
  • 2021-12-23
  • 2022-12-23
  • 2021-05-31
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
相关资源
相似解决方案