Get started

This is a good starting point also for visual designers who prefer to work in HTML, because the script will inject the stylesheet along with the fonts and icons etc.

<link rel="stylesheet" href="//d5wfroyti11sa.cloudfront.net/prod/client/ts-${ts.ui.version}.min.css"/>
<script src="//d5wfroyti11sa.cloudfront.net/prod/client/ts-${ts.ui.version}.min.js"></script>

UI components are initialized on the DOMContentLoaded event, but this might change some day. To make sure that all the components are initialized before you do something to them, you can wrap you code in a callback like this.

ts.ui.ready(function() {
	var component = ts.ui.get(element);
	component.dosomething();
});
  • Before DOMContentLoaded the callback will be executed later.
  • After DOMContentLoaded the callback will execute immedeately.

You can perhaps make it easier for yourself by kickstarting your app with a ts.ui.ready callback, because then you wont't have to worry about it later on.

ts.ui.ready(function() {
	boostrap_everything();
});

Before we begin, you'll need to mark up your page with the basic layout.