try / catch
blocks to hide errors from end
users in production, but must be able to rely on informational errors during development.Jelo.onReady(fn)
adds a function to be executed once the page's
DOM is ready. You can call Jelo.onReady
more than once; each function will be executed in the order it was added.
Jelo.onReady(function() { alert("the document is loaded"); }); var myFunction = function() { alert("both functions will execute on page load"); }; Jelo.onReady(myFunction);
$(selector)
is shorthand for Jelo.Dom.selectNode
, which returns the first matching element.
$$(selector)
(short for Jelo.Dom.select
) works the
same way, but returns an array of matching elements. The selector is any valid CSS selector, for example: