Skip to content

smaltcreation/meteor-imagesloaded

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

meteor-imagesloaded

ImagesLoaded 4.1.0 Meteor package @See desandro/imagesloaded jQuery plugin.

meteor add smaltcreation:imagesloaded

Example of usage

You can use imagesLoaded as a jQuery Plugin.

$('#container').imagesLoaded(function () {
  // images have loaded
});

// options
$('#container').imagesLoaded({
  // options...
  },
  function () {
    // images have loaded
  }
);

.imagesLoaded() returns a jQuery Deferred object. This allows you to use .always(), .done(), .fail() and .progress().

$('#container').imagesLoaded()
  .always(function (instance) {
    console.log('all images loaded');
  })
  .done(function (instance) {
    console.log('all images successfully loaded');
  })
  .fail(function () {
    console.log('all images loaded, at least one is broken');
  })
  .progress(function (instance, image) {
    var result = image.isLoaded ? 'loaded' : 'broken';
    console.log( 'image is ' + result + ' for ' + image.img.src );
  });

More documentation on desandro/imagesloaded GitHub repository.

About

ImagesLoaded Meteor package

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published