Topic: Toggle images in-place
So here I go again,
I have 2 images: A.1) flag_off, A.2) flag.on
I would like to do the following:
In a view, initially display the A.1 image, enclosed in <a> tag. When clicked it will fade out (using visual_effect(:fade)) and the A.2 image will appear (using visual_effect(:appear)).
Seems simple; but I can't wrap my head around it. I would also like the the bit of functionality to work in the reverse order too (that is A.2 fades, A.1 appears.)
What is the easiest way of doing this using the RJS?