Description

Calls the function when DOM is ready. The method uses "window.load" or SoundManager callback if it is present. If the DOM is already loaded (with jquery by example). Do not put the callback function

Usage

Parameters

  • callback {Function}

Example

var canvas = CE.defines("canvas_id").
             ready(function() {
                // DOM is ready
             });

With jQuery :

$(function() {
    var canvas = CE.defines("canvas_id").ready();
});

Discussion