Hi Sean,
This is what I was thinking at first.. however this would require
duplicating the $(document).ready() code into the callback function.
If these $.load snippets are used throughout a site, and each document
has a different ready function, maintenance would be a nightmare.
I'm looking for something a little more "automatic."
Is it possible to pass a variable through to all $(document).ready()
functions? Something like this could work:
$(document).ready(
//assume that $(document).ready passes its functions a parent node
function(parent){
$(".alerter", parent).click( function(){ alert('you clicked
me.'); } );
}
);
Then, after AJAX occurs, invoke the $(document).ready method, passing
it the result to be used as the parent node.
Is this possible?
Thanks for your input,
-sam
On Apr 25, 12:22 pm, "Sean Catchpole" <[EMAIL PROTECTED]>
wrote:
> Hi Sam,
>
> The solution is in the callback function of the ajax command.
> $.load("url",function(result){ $(".alerter",result).click(...) }
>
> Something along those lines. Let me know if that helps.
>
> ~Sean