2

I am trying to use packery as a layout for my gallery. I am using fancybox with the isotope gallery. I don't see fancybox being the issue.

I'm using isotope v2 and the latest packery download. Every single other layout works, even the ones not included in isotope js like fitRows and fitColumns. But with packery I get this error from isotope:

Uncaught Error: No layout mode: packery isotope.pkgd.js line 8

Here is an example on codepen: http://codepen.io/anon/pen/QwXEvr

JS:

jQuery('.fancybox').fancybox({
        openEffect: 'none',
        closeEffect: 'none'
    }); 

$('#testing').isotope({
   'layoutMode': 'packery';
  'itemSelector' :'.item';
});
Jstesting
  • 55
  • 2
  • 8

1 Answers1

7

There are two Packery's, the packery layoutmode that you want, for isotope and the actual library called packery. You are loading the library, which gives you the error. They are not the same. Download and install the isotope packery layout js and you will see it work.

Here is an updated codepen

$('#testing').isotope({
'layoutMode': 'packery',
'itemSelector' :'.item'
});
Macsupport
  • 5,406
  • 4
  • 29
  • 45