Hi.
Has anyone ran into issues with the timing of page.delay. I have been
testing in firefox, for the most part, and it seems that there is no
reliability on when the page.delay timings kick in.
What happens is that sometimes it will work fine, and the countdown
looks great; other times it will just jump to the end and display
everything at once, other times it will be jerky. I’m on a pretty
powerful machine, so the javascript shouldn’t be causing system
slowdowns, from what I can tell…
Maybe I’m using it wrong?
info.rjs
-
page.visual_effect :fade, 'Infoname', :duration => 0.5
-
page.visual_effect :fade, 'InfoDescription', :duration => 0.5
-
page.visual_effect :fade, 'InfoButton', :duratin => 0.5
-
page.delay(1.0) do
-
page.insert_html :top, 'countdown', 'Info in..'
-
end
-
page.delay(2.0) do
-
page.insert_html :bottom, 'countdown', '3'
-
end
-
page.delay(2.3) do
-
page.insert_html :bottom, 'countdown', '.'
-
end
-
page.delay(2.6) do
-
page.insert_html :bottom, 'countdown', '.'
-
end
-
page.delay(3.0) do
-
page.insert_html :bottom, 'countdown', '2'
-
end
-
page.delay(3.3) do
-
page.insert_html :bottom, 'countdown', '.'
-
end
-
page.delay(3.6) do
-
page.insert_html :bottom, 'countdown', '.'
-
end
-
page.delay(4.0) do
-
page.insert_html :bottom, 'countdown', '1'
-
end
-
page.delay(4.5) do
-
page.replace_html 'countdown', '<div
id=“countdownGO”>GO!’
31. page.visual_effect :puff, ‘countdown’, :duration => 0.5
32. end
33. page.delay(5.0) do
34. page.visual_effect :fade, ‘profile-indicator’
35. page.replace_html ‘info’, :partial => ‘info/test’
36. end
Any ideas? Am I using the RJS template in a way it wasn’t designed, or
extremely inefficient, that would cause it to be so erratic?
Thank you for your help.