• YUI Home
  • Gallery Archive
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • Yogi Documentation
  • Shifter Documentation
  • Developer Guide
  • Module Setup

Context Navigation

YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

ImagesLoaded (gallery-imagesloaded) on cdn

Last Updated: 07/30/13
+ 1 -

Clay Liao

YUI Contributor

See 1 more by this user. Created: 07/27/12
Last CDN Push: 08/1/12
Build Tag: gallery-2012.08.01-13-16
Project: YUI 3
License: YUI BSD
YUI Version: 3.11.0
Free for use.

In some cases, images are runtime/dynamic loaded by 3rd provider. We do not know necessary information(e.g. height/width) of them before loaded.

ImagesLoaded allows you do something (Ttriggers a callback) after all images on a page (or section) have been loaded.

Check real case on YUI Masonry Sample.

Special thanks to Tamer, co-contributor of YUI Masonry.

  • Tags:
  • tamer
  • clayliao
  • masonry
  • Download
  • Docs
  • Homepage
  • Bugs
  • Source
  • Example
  • Forum
  • History

Code Sample

<script src="http://yui.yahooapis.com/3.11.0/build/yui/yui-min.js"></script>
YUI({
    //Last Gallery Build of this module
    gallery: 'gallery-2012.08.01-13-16'
}).use('gallery-imagesloaded', function(Y) {
    var container = Y.one('#container');
        Y.imagesLoaded(container, function(){
        // do something when all images have been loaded
    });
});

All code on this site is licensed under the BSD License unless stated otherwise.