The code is here - http://rockpolka.workingidea.com/js/driver.js

I don't understand how this just abruptly stopped working and now I can't
get it to ever work with a callback.


tmcw wrote:
> 
> Can the callback be the function that it's in? For some reason, if I try
> it with another function, for instance, test_alert, it runs, but it the
> callback is the exterior function nothing at all happens.
> 
> 
> wycats wrote:
>> 
>> Yep. I think there should be a way to encapsulate it, but I'll have to
>> give
>> it more thought. I use this technique in an app that has some people
>> insisting on using Prototype, and the great thing is that they can use it
>> to. They simply call docReady("#theirId")
>> 
>> -- Yehuda
>> 
>> On 1/18/07, Justin Carter <[EMAIL PROTECTED]> wrote:
>>>
>>> On 1/19/07, Yehuda Katz <[EMAIL PROTECTED]> wrote:
>>> > What I do is apply a context to the function called by document.ready,
>>> and
>>> > use that context in all of the calls I make in it. Then, on load()'s
>>> > complete, I pass the stuff being updated into that method.
>>> >
>>> > docReady = function(cx) {
>>> >   cx = cx || document;
>>> >   $("tr:odd", cx).addClass("odd")
>>> > }
>>> >
>>> > $(docReady);
>>> >
>>> > $("#container").load(url, function(html) { docReady(html) })
>>> >
>>> > Something like that should work :-D
>>> >
>>> > -- Yehuda
>>>
>>> That's a great tip Yehuda! Keeps everything contained in 1 nice function
>>> :)
>>>
>>> cheers,
>>> Justin
>>>
>>> _______________________________________________
>>> jQuery mailing list
>>> [email protected]
>>> http://jquery.com/discuss/
>>>
>> 
>> 
>> 
>> -- 
>> Yehuda Katz
>> Web Developer | Wycats Designs
>> (ph)  718.877.1325
>> 
>> _______________________________________________
>> jQuery mailing list
>> [email protected]
>> http://jquery.com/discuss/
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Dom-Updates--tf3036986.html#a8595650
Sent from the JQuery mailing list archive at Nabble.com.


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

Reply via email to