Class name

E.controls.timeline (0.1.0)


Method Parameters Returns Description Example
build string Build string of component markup build()
append jquery selector boolean Build and append string to DOM append('#mydiv')
begin date this Set begin date for timeline range begin('14-02-2016')
end date this Set end date for timeline range end('31-10-2016')
event label, begin, end, mode this Build a timeline event event("St. Patrick's Day",'17-03-2016','18-03-2016','info')


This control uses Moment.js for date/time functions, so refer to that documentation for supported date input formats.

Create instance of control

var tl = $E('timeline');

Set begin


Set end

tl.end('1939-10-05 23:59:59');

Add event(s)

tl.event( 'Battle of Westerplatte', 'Sep 1 1939', 'Sep 7, 1939 23:59:59' );

Append to DOM

Last modified: 2016-02-19