Is there anyway to stop my images from flashing as they reload new ones?
Here is the code that I'm using to swap images out onmouseover
but as before it loads the new image, it quickly flashes and shows the divs background colour:
JS:
function chbg(img) {
document.getElementById('navholder').style.backgroundImage = 'url('+img+')';
}
HTML:
<a href="index.html"><div id="button1" onmouseover="chbg('http://placehold.it/300x250')" onmouseout="chbg('http://placehold.it/950x350')"><div id="triangle"></div><div id="buttonname">Home</div></div></a>