This version is out of date, covering development from v5.0.0 to v5.12.2. It is maintained here only for inbound reference links from elsewhere.

Jump to the current version of aTbRef.

Tinderbox 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.


Possible relevant notes (via "Similar Notes" feature):


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