(>> For best viewing experience, please use a screen size of at least 15 inches as the site is not fully responsive yet)
Hovering over the buttons (moon, planet, etc...) causes the background to change. However, there are issues with the transition on Chrome (image0 > blank > image1). It works smoothly on IE11 but may have occasional lag. I haven't tested it on other browsers.
How can we achieve a smoother transition? We need a quick fade from Image0 to image1, without any intermediate color transitions.
Below is the code for the MOON button, which is similar to the others. (I'm not familiar with Javascript and found the following script on Stackoverflow.)
HTML
<div class="top-logos-home" id="top-logos-moon-front"><img src="moon-logo.png" alt="MOON"></div>
CSS
.image-home {
position: absolute;
width: 100%;
height: 100%;
background-image: url(Frontpage.jpg);
background-size: cover;
display:inline;
top:0;
}
JAVASCRIPT
jQuery(function(){
var $body = $('.image-home');
$('#top-logos-moon-front').hover(function(){
$body.css('background-image', 'url("Frontpage-moon.jpg")')
}, function() {
$body.css('background-image', '')
})
})