On-Demand Loadingtop #

Jelo begins as a tiny "seed file" on your page. When you need additional functionality, just pass them to Jelo.load. The last argument is a callback function, which will run as soon as Jelo is done fetching any necessary modules.

<!DOCTYPE html>
<html>
    <head><title>Jelo</title></head>
    <body>
        <script type="text/javascript" src="http://fatfreejelo.com/load/"></script>
        <script type="text/javascript">
            Jelo.load('all', function() {
                // all Jelo modules are now available
            });
        </script>
    </body>
</html>

Why is On-Demand Loading Good?top #

  • It's smart. Jelo tracks what modules it has loaded on a given page, so multiple Jelo.load calls will only fetch what's really missing.
  • It's FAST. Server-side caching and pre-minification ensures a quick download. Client-side caching avoids repeat downloads.
  • Dependencies are handled automatically. Everything arrives in the correct order.
  • Fetch only what you really want. Why force your visitors to download tons of code you never use?
  • Asynchronous loading doesn't block other downloads. The rest of your page can load at the same time as Jelo's components, which means faster response time for your visitors.

Options and Dependenciestop #

(Coming soon: complete dependency chart)

    Jelo.load('all', function() {
        // easiest way to start using Jelo, everything is loaded
    });

    Jelo.load('core', 'ui', function() {
        // Core modules loaded: Core, CSS, Dom, Event
        // UI modules loaded: Anim (animation), DragDrop
    });
    
    Jelo.load('ui', function() {
        // same result: UI depends on Core, so it is automatically included
        // modules loaded: Core, CSS, Dom, Event, Anim (animation), DragDrop
    });
recent changes — (see all)
random jelo shots — (see all)