Login   Register  
Icontem

File: README.md

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Javier Camelis  >  notify  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/plain
Description: Documentation
Class: notify
Bind listeners to dispatch custom events
Author: By
Last change: Documentation fix.
Date: 2013-04-26 08:20
Size: 533 bytes
 

Contents

Class file image Download
notify
======

Light Weight library for bind and trigger custom events.

Methods:
--------

bind('topic', callback);
```javascript
notify.bind('waitingStart', function() {
	//your code
});
```

trigger('topic', data);
```javascript
var data = {
	message: 'Please Wait',
	timeout: 10000
}

notify.trigger('waitingStart', data);
```

unbind('topic');
```javascript
notify.bind('waitingStart', function() {
	//your code
});

notify.bind('waitingStart.mynamespace', function() {
	//your code
});

notify.unbind('waitingStart', data);
```