I have a div whose background image changes depending on a helper’s return. Right now when there is a change it goes white for a millisecond or so and then shows the new image. How can I make the image transition more pleasing?
(If I were changing the image on click, instead of as a result of a helper’s return, then I would do a jquery fadeIn or something like that.)
What you’ve done there is add a transition to the background of <body>, not the div.
I made a fiddle to test it myself https://jsfiddle.net/Herteby/xLejeeej/