Thanks for the optimizations. I think the problem is elsewhere though.... No browser errors. I'm on the latest WebKit.
On Oct 7, 2:05 pm, "Justin Perkins" <[EMAIL PROTECTED]> wrote: > Are you getting any errors? What browser are you using? > > I think that code can be cleaned up a bit, $() is expensive, it should > be used sparingly. Also there is no need to call appear on an already > visible element. > > Ajax.Responders.register({ > onCreate: function(request){ > var loading = $('loading'); > if (loading){ > loading.update('Loading (' + Ajax.activeRequestCount + ')') > // only appear the element if it is not already visible > if (!loading.visible()) loading.appear({duration:0.5}); > } > }, > onComplete: function(request){ > var loading = $('loading'); > if (loading){ > loading.update('Loading (' + Ajax.activeRequestCount + ')'); > if (loading.visible() && Ajax.activeRequestCount < 1) > loading.fade({duration:0.5}); > } > } > > > > }); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---