1. 要先引用jquery

2. ichecker分好多主题,每个主题带好几种颜色,在配置的时候最好指定一下。

比如引入了square主题的blue颜色演示,配置项中checkboxClass就写icheckbox_square-blue,好像写成icheckbox_square也是可以的。不过本人不推荐。

完整代码:

<!DOCTYPE html>
<html>
<head>
<link href="iCheck/skins/square/blue.css" rel="stylesheet">
<script src="http://libs.useso.com/js/jquery/1.10.1/jquery.js"></script>    
<script src="icheck.min.js"></script>
</head>
<body>
<input type="checkbox">
<input type="checkbox" checked>
<input type="radio" name="iCheck">
<input type="radio" name="iCheck" checked>
<script>
    $('input').iCheck({
        checkboxClass: 'icheckbox_square-blue',
        radioClass: 'iradio_square-blue',
        //increaseArea: '20%' // optional
    });
</script>    
</body>
</html>

 

相关文章:

  • 2021-07-26
  • 2021-07-15
  • 2021-08-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-17
  • 2021-10-02
  • 2021-06-23
  • 2022-03-09
  • 2021-08-18
  • 2021-10-04
  • 2021-06-06
相关资源
相似解决方案