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'
]);

 

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 message. I’m alerting you that you are totally awesome!”); // ]]></script>’; }   First, we’re creating a simple if statement in PHP.  Not entirely

Facebook Dings Developers

In the ever growing app community, Facebook is putting the screws to developers looking to use their vast resources to build their apps. Really, they’re just looking for a little “reciprocity”. But come on, how much do you need? You already own and operate the largest website in

Getting Accurate Shipping Rates

If you own an ecommerce store and provide real time shipping rates you have likely encountered a long list of issues with returning accurate rates. If you have not, Bravo good sir or madam! You are the exception. Having real-time shipping rates on your online store is a

Using Red In Website Design

A key component of website design is color, and many designers choose the color red in particular. Red is a passionate, vivid color that may elicit strong feelings and emotions, making it a fantastic choice for designing a strong, compelling website. These are several justifications on why red