jQuery 实现图片预加载

2019PHP高薪工程师学习路线图....>>>

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