Contents
- During Initialization
- After initialization
Having trouble getting help?
Contact Support
Contact Support
Wiring Events
17 May 20161 minute to read
Whenever the control undergoes some changes or action, it should be notified to the users properly. To notify such actions, the appropriate events should be bound to the control. Events are wired the same way as jQuery events are bound, either during or after control initialization.
During Initialization
$(“jquery-selector”).<ejm-plugin-name>({ eventName : <eventhandler> });
Example:
$("#myDate").ejmDatePicker({
select: function () {
// Event handler
}
});
After initialization
$(“jquery-selector”).<ejm-plugin-name>("model.eventName", <eventhandler>);
Example:
$("#myDate").ejmDatePicker("model.select" , function () {
// Event handler
});