Need private packages and team management tools?Check out npm Teams »

jessjs

1.0.2 • Public • Published

jess

浏览器方式使用

  <h3 id="dv1">点我吧!</h3>
  <h3 id="dv2">你还不点我!</h3>
  <h3 id="dv3">你赶紧点我!</h3>

  <script type="text/javascript" src="dist/jess.js"></script>
  <script type="text/javascript">
    console.log(Jess);

    Jess.on('click', dv1, function (that, event) {
      console.log('返回结果:');
      console.log('that:', that);
      console.log('event:', event);
    });

    // 选择器支持数组
    Jess.on('click', [dv2, dv3], function (that, event) {
      console.log('返回结果:');
      console.log('that:', that);
      console.log('event:', event);
    });
  </script>

require方式使用

    const Jess = require('jessjs');

  Jess.on('click', selector, (that, event) => {
      console.log('返回结果:');
      console.log('that:', that);
      console.log('event:', event);
  });

Keywords

Install

npm i jessjs

DownloadsWeekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

10 kB

Total Files

9

Last publish

Collaborators

  • avatar