Return to Snippet

Revision: 28766
at July 14, 2010 03:14 by iqwebdev


Initial Code
<script type="text/javascript">
$.preloadImages = function()
{
       for(var i = 0; i<arguments.length; i++)
       {
               $("<img />").attr("src", arguments[i]);
       }
}

$(document).ready(function()
{
       $.preloadImages("hoverimage1.jpg","hoverimage2.jpg");
});
</script>

Initial URL

                                

Initial Description
Very easy way to preload images which are needed later (e.g. when a hover is performed)

Initial Title
jQuery Image Preloader

Initial Tags
image

Initial Language
jQuery