File: README.md

Recommend this page to a friend!
  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: Update of README.md
Date: 2 years ago
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); ```