Hi,
I am having trouble with rjs templates. Basically I want the item_div
to fade if its already open and then display the new item that the
user selected with the visual effect: appear. The code below causes
the browser (firefox on osx) to open the div and then close it again
as soon as it is open:
page.visual_effect :fade, ‘item_div’, :duration => 0.5
page.replace_html ‘item_div’, :partial => ‘edit’
page.visual_effect :appear, ‘item_div’, :duration => 0.5
Does anyone have any ideas or can anyone point me to some
documentation that explains this?
Just to check that I wasn’t going insane the code below works as I would
expect:
page.hide ‘item_div’
page.replace_html ‘item_div’, :partial => ‘edit’
page.visual_effect :appear, ‘item_div’, :duration => 0.5
Thanks for your help,
Carl.
–
Carl W.
[email protected]