|
Getting_Started
Getting StartedThe first thing you'll need to do is download the source code. Once you have this, include the Javascript and CSS dependencies in the head of your web document. <!-- LIVE CSS--> <link rel="stylesheet" href="/path_to_css/live.css" type="text/css" /> <!-- LIVE JS--> <script type="text/javascript" src="/path_to_js/framework.js"></script> <script type="text/javascript" src="/path_to_js/live.js"></script> Instantiating the Global ObjectNow that you have the dependencies included, you'll need to instantiate the live global object. This is done by adding the following script block to the head of the web document. <script type="text/javascript">
window.live = new live();
</script>window.livelive is a global, self-contained umbrella object that encapsulates all of the UI's functionality. As you can see, we assigned the newly created live object as a property of the window object. This ensures that the live object will always have a global scope and can be found easy when looking at objects in a Javascript debugging tool such as FireBug. Upon runtime, live will begin to construct the rest of the underlying UI library. In addition, live will set up a few useful tools of it's own. If you are interested in the live global object and what it does, please read the details Common Library PracticesAll libraries configurable, extensible, and object-oriented. Every time a library instantiated, it will only and always accept a single parameter: an library-specific object. No more remembering parameter orders or type. Below is a basic example: my_new_tabs = new Tabs({
container: 'tab-container'
});live Bound LibrariesSome libraries are bound to the live global object because they do not need to be re-instantiated once run-time execution happens. These include:
Globally Bound LibrariesThe majority of live's libraries have the potential of being used one or more times during or after initial runtime. The libraries are globally bound so they to do not bloat the global object. These include:
|