Hi everyone I’m very new to Ruby on Rails and have just gotten a
slideshow type application working. In one div there are all the images
in the database and when you click it an AJAX call is made that makes
the image appear in another div called “divProductDisplay”. I have it
all working with the AJAX and everything, but I can’t figure out how to
get the visual effects working the way I want. I want the product to
appear when an image is first clicked, and when another image is clicked
I want the image to disappear and then have the image that was just
clicked reappear.Here is what I have in the .rjs template right now:
page.replace_html(“divProductDisplay”, :partial => “product_display”)
page.visual_effect(:toggle_appear, “divProductDisplay”)
This WORKS, but it will appear an image when clicked and then disappear
the image when another is clicked. I don’t know how to write anything to
get this working write as I am very knew to Rails and any back-end
programming language. If you need any other information tell me what you
need. Thanks for any help you can offer.