Return to Snippet

Revision: 13043
at April 6, 2009 10:29 by Uzbekjon


Initial Code
// Insert preloaded image after it finishes loading
$('<img />')
    .attr('src', 'imageURL.jpg')
    .load(function(){
        $('.profile').append( $(this) );
        // Your other custom code
    });

Initial URL
http://jquery-howto.blogspot.com/2009/02/preload-images-with-jquery.html

Initial Description
This script preloads images in your document or lets your to preload images by their url and insert or append them in your DOM tree later.

Initial Title
jQuery Preload Images

Initial Tags
javascript, jquery

Initial Language
jQuery