docs: function ImagesReady(elements, jquery) {
    if (typeof elements === 'string') {
      elements = document.querySelectorAll(elements);
      if (!elements.length) {
        throw new Error('selector `' + elements + '` yielded 0 elements');
      }
    }
  
    var deferred = defer(jquery);
    this.result = deferred.promise;
  
    var images = this.imageElements(
      this.validElements(this.toArray(elements), ImagesReady.VALID_NODE_TYPES)
    );
  
    var imageCount = images.length;
  
    if (imageCount) {
      this.verify(images, status(imageCount, function(ready){
        if (ready) {
          deferred.resolve(elements);
        }
        else {
          deferred.reject(elements);
        }
      }));
    }
    else {
      deferred.resolve(elements);
    }
  }