Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
larukedi edited this page Oct 18, 2014 · 3 revisions

Events always calls registered functions whenever invoke method called with same event name.

Document Ready Event

Usage: $l.ready(fnc)

$l.ready(function() {
    console.log('document loaded.');
});

Subscribing to an event

Usage: $l.events.add(event, fnc)

$l.events.add(
    'test',
    function() { console.log('tested'); }
);

Invoking an event

Usage: $l.events.invoke(event)

$l.events.invoke('test'); // outputs 'tested'
Clone this wiki locally