On Wednesday 03 May 2006 11:08, Jim Geurts wrote:> Are there available events that can be hooked regarding the $$ function?
>
> For example, my application makes use of a function similar to
> $$(''.MyClass'').each(function(element, index) { /* Do
something nifty */ });
> and it takes a noticeable amount of time. I''m thinking that it
would be
> beneficial to show a loading image while $$ is processing. So I was
> curious if the $$ function offered any event hooks (beforeStart,
> afterFinish, etc) like scriptaculous events do... Does anyone think that
> this would work? or would the browser be locked and not animate the gif?
no, it doesn''t, but you could easily:
Element.show(''loading'');
$$(''.MyClass'').each(function(el, idx) { /* code */ });
Element.hide(''loading'');
-Jeremy
--
Jeremy Kitchen ++ kitchen-RA8HwDor7flnDGu+y90WmgC/G2K4zDHf@public.gmane.org
http://ipaction.org/ -- defend your rights to fair use
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs