addOnClickEvent(eventHandler)
JavaScript API Reference/Ab.timeline.TimelineController object
addOnClickEvent(eventHandler)
Set the JavaScript event handler that will be called by the timeline control when the user double-clicks on the event block. You it if you wish to display additional information about the event in a dialog window, or allow the user to change event properties, or update another part of the view depending on the selected event.
Parameters:
-
eventHandler
(function reference): the function should be defined in your code, and should accept two parameters: -
e
(reference): reference to the browser event that is being handled, in this casedblclick
event -
event
(object):Ab.timelineEvent
object that the user clicked on.
Example:
timeline.addOnClickEvent(onClickEvent);
...
function onClickEvent(e, event) {
alert(event.getDescribingStatus());
}