Peter De Berdt wrote:
>
> A much better solution than patching the rails helpers would be to add
> the following to public/javascripts/application.js (it adds a nice
> little fade in and fade out too):
>
> Ajax.Responders.register({
> onCreate: function() {
> new Effect.Appear('loading', { duration: 0.3 });
> },
> onComplete: function(request, transport, json) {
> if (0 == Ajax.activeRequestCount) {
> new Effect.Fade('loading', { duration: 0.3 });
> }
> if(!request.success()) {
> alert('An error occurred while processing this request');
> }
> }
> });
>
>
It does indeed look pretty cool but it only works on the first click.
It's not showing when I click somewhere else afterwards.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---