Tutorial: 01-quickstart

01-quickstart

Refugee Lib - Tutorial 01 - Quickstart The quickest way to get started using Refugee Lib is to load the Hello World Template and to view its source. :)

See also: rlBoot.bootRefugeeLib

Here is a basic Refugee Lib project template:
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <meta name="Author" content="http://www.dennisbusch.de">
    
    <title>Refugee Lib Page Template</title>

    <!-- include Refugee Lib -->                     
    <script type="text/javascript" src="./script/rlBoot.js"></script> 
    
  </head>
  <body>
    <div id="divMain" style="display: table-cell; width: 400px; height: 300px; vertical-align: middle; text-align: center; color: #FFFFFF; background: #80C0E0;">
    Please enable <i>javascript</i> and then reload this page.
    </div>
  
    <script type="text/javascript" defer>           
      var mainFunc = function(bootCode)
      {   
        if(bootCode == 0) // if library initialized successfully
        {
          // do stuff
        }
      };
      
      // initialize Refugee Lib
      var additionalScripts = [];
      rlBoot.bootRefugeeLib("divMain", additionalScripts, this, mainFunc, true);
    </script>
  </body>
</html>