This version is out of date, covering development from v6.0.0 to v6.6.5. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

TinderboxSix Icon

element: string

element: 'string'

A quoted string that is the HTML id of the target canvas element. This creates a timeline in canvas element with the ID "myTimeline".

Timeline.create({element: 'myTimeline'}; 

Thus it targets:

<canvas id=""myTimeline" width="850" height="600">

As the value of element is an HTML ID ensure the name chosen is a valid HTML ID string (A-Z, a-Z, 0-9, underscore, hypen; muse start with a letter; no accents, etc.).

The height and width of the canvas are set in HTML or via CSS - they are not Timeline JS parameters. However, the Timeline code export dialog does offer boxes allowing the user to preset height and width that are used by the exported code.

A Tinderbox Reference File : Syntax Library : Web Timeline customisation : JavaScript Library : The Timeline Object : .create() : Required parameters : element: string