Jquery icheck插件点击加载函数

时间:2018-02-28 07:25:39

标签: jquery triggers click icheck

我正面临一些问题Jquery icheck onload函数点击触发器例如: - 这是我的功能以及我想要做的...

function resetfilter() {
  $('.filtercheckbox').each(function() {
    var isChecked = $(this).is(':checked');
    if (isChecked == true) {
      $(this).trigger('click') /// this case trigger not working with iCheck Jquery Plugins . can you suggest me how to execute trigger function onclick=" resetfilter()" this function
    }
  });
}

这是我的HTML ...

<input class="icheck onclick="filterData();"  filtercheckbox filter-nn" type="checkbox" checked value="1">
<input class="icheck onclick="filterData();" filtercheckbox filter-nn" type="checkbox" checked value="2">
<input class="icheck onclick="filterData();"  filtercheckbox filter-nn" type="checkbox" checked value="3">
<input class="icheck onclick="filterData();" filtercheckbox filter-nn" type="checkbox" checked value="4">
<button class="btn btn-warning btn-round btn-sm" onclick="resetfilter(this);">Reset</button>

on load这个函数resetfilter()需要逐个运行clickData()函数的点击触发器.....?

0 个答案:

没有答案