Sha256: 1437b72c2e50b9d02773627b09ea0bddd1cc0d2d747a2b556763495b7660caba

Contents?: true

Size: 550 Bytes

Versions: 14

Compression:

Stored size: 550 Bytes

Contents

/* @preserve Masonry Init */
try {
  var elem = document.querySelector('.grid');
  var msnry = new Masonry(elem, {
    itemSelector: '.grid-item',
    columnWidth: '.grid-sizer',
    gutter: '.gutter-sizer',
    percentPosition: true
  });

  // layout Masonry after each image loads
  var imgLoad = imagesLoaded(elem);
  imgLoad.on('progress', function (instance, image) {
    msnry.layout();
  });
} catch (err) {
  if (err instanceof ReferenceError) {
    // Do nothing, Masonry is defined only in the gallery page
  } else {
    throw err;
  }
}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
type-on-strap-2.4.11 assets/js/partials/masonry_init.js
type-on-strap-2.4.10 assets/js/partials/masonry_init.js
type-on-strap-2.4.9 assets/js/partials/masonry_init.js
type-on-strap-2.4.8 assets/js/partials/masonry_init.js
type-on-strap-2.4.7 assets/js/partials/masonry_init.js
type-on-strap-2.4.6 assets/js/partials/masonry_init.js
type-on-strap-2.4.5 assets/js/partials/masonry_init.js
type-on-strap-2.4.4 assets/js/partials/masonry_init.js
type-on-strap-2.4.3 assets/js/partials/masonry_init.js
type-on-strap-2.4.2 assets/js/partials/masonry_init.js
type-on-strap-2.4.1 assets/js/partials/masonry_init.js
type-on-strap-2.4.0 assets/js/partials/masonry_init.js
type-on-strap-2.3.11 assets/js/partials/masonry_init.js
type-on-strap-2.3.10 assets/js/partials/masonry_init.js