ProperLoad jQuery Plugin

Download

Usage

For a good example of how to use this plugin, view the source code of this page.

This is a jQuery plugin, so remeber to include jQuery. And view source code of this page for an example.

The javascript needed.

<script type="text/javascript" >
    $(document).ready(function(){	
        $("img").properload(callback, allImgs);
    });
</script>

allImgs this option can be 2 things: true, meaning that the only callback that will fire is when all images has been loaded".
false, meaning that the plugin will just make a callback on each image, when it has been loaded

The "this" keyword works inside the callback function points to the image that was loaded. Or all the images, if the callback only runs after all images has been loaded.

If this helped you do your work, then consider making a donation