For anyone else interested, i found this: http://www.joelonsoftware.com/items/2006/08/01.html
Cool ALex On 20 December 2010 13:51, Alex Hough <[email protected]> wrote: > Thanks FND, very helpful > > best wishes > > Alex > > > > > > On 20 December 2010 12:56, FND <[email protected]> wrote: > >> > i don't understand the rationale behind your code: [...] >> > To me, the fadeOut value is set using a function which calls fadeIn. >> >> http://en.wikipedia.org/wiki/Callback_(computer_science) >> >> We're passing in a function as an argument*. This function will be >> executed once (IOW deferred until) the fadeOut animation has completed. >> Since that's an asynchronous operation, we can't just provide a sequence >> of statements like "fadeOut(); fadeIn();". >> >> Because of its non-sequential nature, asynchronous programming can seem >> a little weird at first (and, with JavaScript, often requires a good >> understanding of closures and variable scope), but it's not so bad once >> you wrap your head around it. >> >> >> -- F. >> >> >> * FWIW, it might be less confusing this way: >> var callback = function(ev) { >> jQuery(this).fadeIn(); >> }; >> jQuery(place).fadeOut(callback); >> >> -- >> You received this message because you are subscribed to the Google Groups >> "TiddlyWiki" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<tiddlywiki%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/tiddlywiki?hl=en. >> >> > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.

