what is an isotope of an element code example
Example 1: how to use isotope
<div class="grid" data-isotope='{ "itemSelector": ".grid-item", "getSortData": { "name": ".name", "category": "[data-category]" }, "masonry": { "columnWidth": 200 } }'>
Example 2: how to use isotope
// with jQuery
var $grid = $('.grid').isotope({
itemSelector: '.grid-item',
getSortData: {
name: '.name',
category: '[data-category]'
},
// layout mode options
masonry: {
columnWidth: 200
}
});
Example 3: how to use isotope
// with vanilla JS
var iso = new Isotope( '.grid', {
itemSelector: '.grid-item',
getSortData: {
name: '.name',
category: '[data-category]'
},
masonry: {
columnWidth: 200
}
});