Yea, I'd looked at using a "schedule" function, but it requires the use of an element's ID. I was hoping I could do it simply using jQuery.

Maybe I could use a jQuery selector to find the object, and if it doesn't exist yet keep trying (using setInterval/setTimeout) until the DOM has completed loading. And since my understanding of the DOM, CSS, and XPath are much better than my JavaScript I thought the jQuery community might be able to provide a solution quicker than I could hack one together. :-)

Phill

Yehuda Katz wrote:
You could try creating a setInterval that constantly checks for the existence of your element, but that's a pretty dirty hack.

-- Yehuda

On 1/8/07, * Phillip B Oldham* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi all

    I need to fire an event/run a method once an element (in this case
    a div with a list inside) has loaded, but before $(document).ready().

    I'd like to be able to use simple jQuery objects... something like:

    $('#mydiv').hasloaded(function(){
        //do something here
    });


    $(document).ready(function(){
        //do the rest of the "window.onload" events here
    });

    I've been looking through the source, and it seems to me that
    doing $('#mydiv').ready(function(){}); will fire when the whole
    DOM has loaded, which will probably be a little late for me.

    Any idea on how I can do this?

    Phill

    _______________________________________________
    jQuery mailing list
    [email protected] <mailto:[email protected]>
    http://jquery.com/discuss/






--
Yehuda Katz
Web Developer | Wycats Designs
(ph) 718.877.1325
begin:vcard
fn:Phillip Oldham
n:Oldham;Phillip
org:The Activity People;Systems Development
email;internet:[EMAIL PROTECTED]
title:Chief Programmer
tel;work:0870 162 4847
x-mozilla-html:TRUE
url:http://theactivitypeople.co.uk/
version:2.1
end:vcard

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to