If you are not working in a container (etc.) that has a background image, no. You might want to consider changing the “cross-fading of the background of one element” to “changing the opacity of more than one container, each of which has its own background image,” which is a more realistic approach with JS.
source share