Getting started

  1. Download

    Download the latest version from SourceForge SwirlJS.

  2. Extract

    Extract the archived file in the root of your web project.

  3. Create a new html page

    Open your favorite editor or IDE and create a html page.
    Example index.html:

    <!DOCTYPE HTML>
    <html>
      <head>
      </head>
      <body>
      </body>
    </html>
    								

  4. Include SwirlJS

    Insert the following script tags in the header of your html page. One for the language and one for the base library.

    <script type="text/javascript" src="swirljs/swirl_en.js"><script>																	
    <script type="text/javascript" src="swirljs/swirl_base_min.js"><script>								
    								
    And add the theme file to the header.
    <link  href="swirljs/swirl_style.css" type="text/css" rel="stylesheet">							
    								
    The result:
    <!DOCTYPE HTML>
    <html>
      <head>
        <link  href="swirljs/swirl_style.css" type="text/css" rel="stylesheet">
        <script type="text/javascript" src="swirljs/swirl_en.js"><script>
        <script type="text/javascript" src="swirljs/swirl_base_min.js"><script>
      </head>
      <body>
      </body>
    </html>
    								

  5. Hello world

    This example shows a simpel message box when the button is pressed.

    <!DOCTYPE HTML>
    <html>
      <head>
        <link  href="swirljs/swirl_style.css" type="text/css" rel="stylesheet">
        <script type="text/javascript" src="swirljs/swirl_en.js"><script>
        <script type="text/javascript" src="swirljs/swirl_base_min.js"><script>
      </head>
      <body>
        <form id="form1">
    	  <input type="button" value="Click me!" 
    		onclick="swirl_message('My first message box', 'Hello world!', 'Close', 400)">
    	</form>
      </body>
    </html>
    							

Visit the manual page to learn more.