I'm trying to get the background image to change every 6 seconds and it's always a 404 error:
For example, the below appears in the JS console
http://localhost:3000/app/assets/images/ggb_mist.png 404 (Not Found)
To simplify this I just tried a background-color
to make sure it was working. See below:
$(document).ready(function() {
function testing() {
$('.holder').css('background-color', 'red');
};
});
The above works. Now when I try to do the same with an image (which is located in app/assets/images/imagefilenamehere.png
I always get a 404 error. I've tried:
filenamehere.png
../assets/images/filenamehere.png
../app/assets/images/filenamehere.png
../images/filenamehere.png
Why won't the below work?
$('.holder').css({'backgroundImage':'../assets/images/filenamehere.png'});
Any input on the matter is appreciated.