Hi, I''ve been able to succesfully queue page.visual_effect commands in my RJS templates. Each command will wait to execute until the previous command is done executing. But I''d also like to execute a page.replace_html command AFTER the page.visual_effect commands. I have a series of five DIVs: div1 div2 div3 div4 div5 When the user clicks on div1, a page.visual_effect command is executed in div1 disappears. At this point, I want to execute a page.replace_html command on my divs. Right now, the visual_effect and replace_html execute in parallel, so you never see the visual_effect take place. Can anyone help me with this? Thanks in advance! Brandon -- Posted via http://www.ruby-forum.com/.
I hope I''m wrong, but I don''t think that can be done without writing your own javascript. I''ve asked the same question multiple times but no answer. Could you post your queued visual effects code. I haven''t tried to do that with rjs yet. On Mon, 2006-04-03 at 19:40 +0200, Brandon S. wrote:> Hi, > > I''ve been able to succesfully queue page.visual_effect commands in my > RJS templates. Each command will wait to execute until the previous > command is done executing. > > But I''d also like to execute a page.replace_html command AFTER the > page.visual_effect commands. I have a series of five DIVs: > > div1 > div2 > div3 > div4 > div5 > > When the user clicks on div1, a page.visual_effect command is executed > in div1 disappears. At this point, I want to execute a > page.replace_html command on my divs. Right now, the visual_effect and > replace_html execute in parallel, so you never see the visual_effect > take place. > > Can anyone help me with this? > > Thanks in advance! > > Brandon >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060403/4b6cecb9/attachment.html
Charlie, Check out this page for details: http://www.railsdevelopment.com/2006/01/15/effectqueue/ All I had to do was add the :queue => ''end'' parameter to the end of my visual_effect commands. I hope this helps. Brandon -- Posted via http://www.ruby-forum.com/.
Hi Brandon, Effects have events you can use to syncronize your other code with them. For example: new Effect.BlindDown(''customer_edit'', { afterFinish: function(element){alert(''You can see it now'');} }); Event names are beforeStart, beforeSetup, beforeUpdate, beforeFinish and their ''after'' mates. Enjoy. -- Posted via http://www.ruby-forum.com/.
Thank you! I''ve been trying to figure out how to do this but to no avail! On Mon, 2006-04-03 at 20:08 +0200, Sergei Serdyuk wrote:> Hi Brandon, > > Effects have events you can use to syncronize your other code with them. > > For example: > > new Effect.BlindDown(''customer_edit'', { > afterFinish: function(element){alert(''You can see it now'');} > }); > > Event names are beforeStart, beforeSetup, beforeUpdate, beforeFinish and > their ''after'' mates. > > Enjoy.-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060403/6754155a/attachment.html