on page load?

1 view
Skip to first unread message

kevwil

unread,
Feb 6, 2009, 1:36:12 PM2/6/09
to Ojay talk
Apologies for such a newbie question but I rarely do JavaScript
programming. I have looked at the Ojay site for about an hour now and
have not seen anything directly related to handling proper page load
events for running scripts once the DOM is ready.

I've used jQuery before, but this time I've been told to evaluate
Ojay. I'm somewhat familiar with this in jQuery:

$(document).ready(function(){
// Your code here
});

What is the equivalent in Ojay? This?

$(document).on('ready', function(){
// Your code here
});

Benedict Eastaugh

unread,
Feb 6, 2009, 2:18:12 PM2/6/09
to ojay...@googlegroups.com
> What is the equivalent in Ojay? This?

Ojay.onDOMReady(function() {
// ...
});

Using the $ alias if you prefer, of course.

Kevin Williams

unread,
Feb 6, 2009, 2:43:01 PM2/6/09
to ojay...@googlegroups.com
Thank you!!
Reply all
Reply to author
Forward
0 new messages