2017-01-22 18:36:33 +01:00
# Isotope
_Filter & sort magical layouts_
2019-09-30 10:44:43 +02:00
See [isotope.metafizzy.co ](http://isotope.metafizzy.co ) for complete docs and demos.
2017-01-22 18:36:33 +01:00
## Install
### Download
2019-09-30 10:44:43 +02:00
+ [isotope.pkgd.js ](https://npmcdn.com/isotope-layout@3/dist/isotope.pkgd.js ) un-minified, or
+ [isotope.pkgd.min.js ](https://npmcdn.com/isotope-layout@3/dist/isotope.pkgd.min.js ) minified
2017-01-22 18:36:33 +01:00
### CDN
2019-09-30 10:44:43 +02:00
Link directly to Isotope files on [npmcdn ](https://npmcdn.com ).
2017-01-22 18:36:33 +01:00
``` html
2019-09-30 10:44:43 +02:00
< script src = "https://npmcdn.com/isotope-layout @3 .0/dist/isotope.pkgd.min.js" ></ script >
2017-01-22 18:36:33 +01:00
<!-- or -->
2019-09-30 10:44:43 +02:00
< script src = "https://npmcdn.com/isotope-layout @3 .0/dist/isotope.pkgd.js" ></ script >
2017-01-22 18:36:33 +01:00
```
### Package managers
npm: `npm install isotope-layout --save`
2019-09-30 10:44:43 +02:00
Bower: `bower install isotope --save`
2017-01-22 18:36:33 +01:00
## License
### Commercial license
2019-09-30 10:44:43 +02:00
If you want to use Isotope to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Purchase an Isotope Commercial License at [isotope.metafizzy.co ](http://isotope.metafizzy.co/#commercial-license )
2017-01-22 18:36:33 +01:00
### Open source license
If you are creating an open source application under a license compatible with the [GNU GPL license v3 ](https://www.gnu.org/licenses/gpl-3.0.html ), you may use Isotope under the terms of the GPLv3.
2019-09-30 10:44:43 +02:00
[Read more about Isotope's license ](http://isotope.metafizzy.co/license.html ).
2017-01-22 18:36:33 +01:00
## Initialize
With jQuery
``` js
$('.grid').isotope({
// options...
itemSelector: '.grid-item',
masonry: {
columnWidth: 200
}
});
```
With vanilla JavaScript
``` js
// vanilla JS
var grid = document.querySelector('.grid');
var iso = new Isotope( grid, {
// options...
itemSelector: '.grid-item',
masonry: {
columnWidth: 200
}
});
```
With HTML
Add a `data-isotope` attribute to your element. Options can be set in JSON in the value.
``` html
< div class = "grid"
data-isotope='{ "itemSelector": ".grid-item", "masonry": { "columnWidth": 200 } }'>
< div class = "grid-item" > < / div >
< div class = "grid-item" > < / div >
...
< / div >
```
* * *
2019-09-30 10:44:43 +02:00
By [Metafizzy ](http://metafizzy.co ), 2010– 2016