es131245 Posted April 8, 2010 Share Posted April 8, 2010 On my site i use img as nav+submit/cancel buttonsim using onmouseover on those img to change src of an img to a more contrast oneso then the page load everything is fine but then i point mouse over those imgsthey do change (src) to more contrast one but it takes a second!!! and this second i see an alt text!!!!!i dont see any onmouseover or :hover attributes for contrastso is there any way i can cache those imgs while page loads??ive tryed even a <img id="home" src="icons/home2.png"...+window.onload {document.getElementById('home').src='icons/home.png';} Here a source of a nav button <tr class="mr2"><td class="mr2b1"><a href="http://y-es.ru/"><img id="home" src="source/icons/png/24/link/home.png" onMouseOver="this.src='source/icons/png/24/link/home2.png';" onMouseOut="this.src='source/icons/png/24/link/home.png';" alt="home" /></a> Link to comment Share on other sites More sharing options...
Synook Posted April 8, 2010 Share Posted April 8, 2010 The best way is to use CSS sprites. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.