Latest Download

Other Available Package

Build your custom Savvy.UI

Custom Builder

Feel lost?

Check out these instructions.

Events Using .ready()

.ready() function under SUI.Ext.Elements is simplify SUI.onDOMReady callback.

  1. Loading the DOM
  2. Load one big Image

You can also view the code from event-using-ready.js.

SUI(document).ready(function() {
    	SUI("ol#ready").add("li").text("DOM is ready, by .ready()!");
});
var wfn = window.onload;
window.onload = function() {
    	SUI("ol#ready").add("li").text("Page is ready, by window.onload()!");
};

Alternatively you can also use:

SUI("ol#ready").ready(function() {
    	SUI(this).add("li").text("DOM is ready, by .ready()!");
});

<ol id="ready">
    	<li>Loading the DOM</li>
    	<li>Load one big Image<br />
    	    	<img src="http://www.nasa.gov/images/content/84857main_EC04-0325-23_lg.jpg?" style="width:300px; height:175px" alt="" />
    	</li>
</ol>

This example requires the following namespace:

  • SUI.Ext.Elements
  • SUI.onDOMReady

Note: Assigning .ready() to document allow you to have a global on DOM ready and you can add many .ready() function as you want.