I am trying to change the back ground image url’s based on the time of the day. Like in the morning AM time sun rising ….sun set. Each has its own png file and a url. I am creating the site in ruby on rails and using sass-rails for css.
So my question, is there a smart way to change the bg image url of css class reading from a helper method or something?
Or use Jquery to call a server side method and return the image url?
Any help is much appreciated.
try this way
source : http://www.sitepoint.com/forums/showthread.php?744436-Changing-div-background-image-based-on-time