Precache images

linkaiyi
Follow

precache images

function preloadImage(url)
{
    var img=new Image();
    img.src=url;
}
// or just initialise a Image object

new Image().src = url;

// 

$(document).ready(function() {
        new Image().src = '/media/image/quiz_error_info.png';
        screenfull.onchange(function () {
            if (!screenfull.isFullscreen) {
                // console.log('exit');
                canvas = document.getElementById('the-canvas');
                canvas.style.height = null;
                canvas.style.width = '100%';
                var right =  document.getElementById('next');
                right.style.left = null;
                right.style.right = '20px';
            }
        });
    })
Object has 0 attachments

Was this article helpful?

This article is viewed 55 times!

Recent Viewed Articles

0 Comments

Leave a Comment

Support