Right now the demo/test exhibits two tests cases: on doc ready, and cloning/appending elements. Are there any other test cases we should consider?
There is some testing infrastructure in here that may be of help https://github.com/peol/jquery.imgloaded/blob/master/qunit/index.html
hmm, normally, using on() and off(), you can bind- and unbind events. How could we unbind the imagesLoaded function? The thing is, in some cases you want to be able to dynamically add the check for the loading of images, and when they're done loading remove the checking.
@michahell imagesLoaded is not an event. It is one time function call that gives you a callback after all images from stack has finished with loading. And when they are done, and callback has been fired, it removes all attached event listeners itself. No need to do that yourself.
I know this, however, the removing of all attached event listeners wasn't happening for some reason. In my implementation, the callback fired +1 times after each time i called the imagesLoaded function somehow. I fixed it now though, was probably something i did wrong :)
v3 overhaul has tests with Qunit. The demo is pretty solid too. Closing.