Preloading Images with Jquery

There are times when preloading images is an important step in keeping your site/page/program running smoothly. This is especially true in the era of mobile.

Here’s a cute little snippet that does just that.

function preload(yourarrayOfImages) {
    $(yourarrayOfImages).each(function(){
        $('<img/>')[0].src = this;
    });
}

preload([
    'img/image1.jpg',
    'img/image2.jpg',
    'img/image3.jpg'
]);

 

The Amazon Dams Network

Proud to present the first online version of the Amazon Dams Network. This has been a project Livewire has been working on for several months

Read More »

Javascript called by PHP

Interesting little snippet. What is going on here? Livewire gives you the low down.    if($num_rowvs == 0){ echo ‘<script>// <![CDATA[ alert(“This is an alert

Read More »