JS Switchery并不起作用

时间:2015-02-12 23:16:12

标签: javascript

我将switchery.js用于我的项目https://github.com/abpetkov/switchery

<head>
  <link rel="stylesheet" href="css/switchery.css">
  <script src="js/switchery.js"></script>
  <script>
      var Switchery = require('switchery');

var elems = Array.prototype.slice.call(document.querySelectorAll('.switchery'));

elems.forEach(function(html) {
    var switchery = new Switchery(html);
});
    </script>
  <body>
    <div id="wrapper">
      ... 
          <div id="screen-2"><input type="checkbox" class="switchery"></div>
      ...
      
      </div>
    </body>

但问题是,它看起来像标准复选框。 请帮忙!

0 个答案:

没有答案