07.05 javascript saved
the_undefined
Tags add more
 
Note
the_undefined did not leave a note
  1. $(function() {
  2.     $('img.relevant').imagesReady(function() {
  3.         // Element positioning code goes here
  4.     });
  5. });
  6.  
  7. $.fn.imagesReady = function(callback, scope) {
  8.     var $images = this
  9.         .bind('load', function() {
  10.             var image = this;
  11.             $images = $images.filter(function(){return this !== image});
  12.             if ($images.length == 0) {
  13.                 callback.call(scope || $images);
  14.             }
  15.         });
  16.     return $images;
  17. }
Parsed in 0.008 seconds, using GeSHi 1.0.7.14

Modify this Paste