[jQuery] $(document).ready doesn't pass document
I'm trying to get a site using iframes working, and for that I do the
following:
$(frameDocument).ready(frameInit);
where frameInit is a function that sets up the logic for the page in
the frame.
I'd like to be able to just use normal queries like $('a') in
frameInit instead of queries like $('a', frameBody) since I'd like the
frame document to work, even though it's not loaded in the frameset,
but it seems the ready function doesn't change the this variable to
the document in question.
In short:
$('a').click(function) passes the a node to the function but
$(document).ready(function) does not pass the document node to the
function, but uses the "standard" document.
Is this how it's supposed to be, or am I handling jQuery incorrectly?
Cheers,
Christian Dannie Storgaard