I have a form wich I want to show it only if I clic on a link. I want that form, with div="related", to appear with the Appear effect of scriptaculous. This form alreday has some AJAX.
Something along the lines of link_to_function 'ClickMe', "$ ('some_id').appear()" will make the page element with that id appear.
Fred
Frederick Cheung wrote:
I have a form wich I want to show it only if I clic on a link. I want that form, with div="related", to appear with the Appear effect of scriptaculous. This form alreday has some AJAX.
Something along the lines of link_to_function 'ClickMe', "$ ('some_id').appear()" will make the page element with that id appear.
Fred
My code is:
<div id ="fadePic"> <img alt = "my_image" src = "/images/Logo_small.jpg" /> </div>
<%= link_to_function "Appear", "new Effect.Appear('fadePic', { duration:2 })" %>
I want the fadepic only to appear in my view once I press the Appear link.
Frederick Cheung wrote:
I have a form wich I want to show it only if I clic on a link. I
want that form, with div="related", to appear with the Appear effect of scriptaculous. This form alreday has some AJAX.Something along the lines of link_to_function 'ClickMe', "$ ('some_id').appear()" will make the page element with that id appear.
Fred
My code is:
<div id ="fadePic"> <img alt = "my_image" src = "/images/Logo_small.jpg" /> </div>
<%= link_to_function "Appear", "new Effect.Appear('fadePic', { duration:2 })" %>
Style it so that it is initially invisible. (display: none)
Fred