1.0.5 • Published 7 years ago

bind-on-events v1.0.5

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

Install with npm:

npm i --save bind-on-events

How to use

jQuery is required.

    <a onClick="letSee(1,2)">click and see</a>

should require you define letSee function as scope. In jquery, you can bind click event to your function like this

    $('a').on('click', function() {
        
    });

so with bind-on-events, you can do it like this

    
    var bindEvents = require(' bind-on-events');
    var service = {
        letSee: function(a, b)  {
            
        }
    }
    
    bindEvents($('a'), service);

and html like this

    <a xbn-on-click="letSee(1,2)">click and see</a>

Event supported

  1. xbn-on-click
  2. xbn-on-blur
  3. xbn-on-enter
  4. xbn-on-change
1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago