I have some questions on RJS/AJAX. I want some text to appear on the
screen and grow larger. The main problem I have is that if I set the
text size to 60 and then use the grow effect, it flashes on the screen
as large text for a split second, then disappears and then grows from
small to large. I don’t want that split second flashing to occur. Also,
it would be nice if I didn’t have to have a click on enter to start the
effect, but it would start up immediately. I’m guessing I may have to
define my own javascript temnplate ?
Here is what I have tried:
<%= javascript_include_tag :defaults %>
<%= link_to_remote “ENTER”, :url => {:action => “enter” }%>
class MainController < ApplicationController
def enter
render :update do |page|
page[:hdr].set_style :‘visibility’ => ‘visible’
h = :hdr
page[h].set_style :‘font-size’ => 60
page[h].set_style :‘color’ => “blue”
page[h].visual_effect :grow, :duration => 5
end
end