Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 455 Bytes

README.md

File metadata and controls

26 lines (16 loc) · 455 Bytes

CEvent

jQuery custom event wrapper class.

Usage:

var Event = new Utils.CEvent("somenamespace"); 

//or: var Event = new Utils.CEvent("somenamespace", $(<target-selector>));

Event.subscribe("sometopic", function (e, params) { 
	console.log("callback");
	console.log(params);		
	console.log(e.namespace);
	console.log(this);
});

Event.publish("sometopic", [{"a":"1"}, "b"]);

Event.unsubscribe("sometopic");	


```