diff --git a/README.mdown b/README.mdown index e406703d..2b0385c5 100644 --- a/README.mdown +++ b/README.mdown @@ -41,40 +41,41 @@ If you are creating an open source application under a license compatible with t ## Initialize -### In JavaScript +With jQuery ``` js -// jQuery -$('#container').isotope({ +$('.grid').isotope({ // options... - itemSelector: '.item', + itemSelector: '.grid-item', masonry: { columnWidth: 200 } }); ``` +With vanilla JavaScript + ``` js // vanilla JS -var container = document.querySelector('#container'); -var iso = new Isotope( container, { +var grid = document.querySelector('.grid'); +var iso = new Isotope( grid, { // options... - itemSelector: '.item', + itemSelector: '.grid-item', masonry: { columnWidth: 200 } }); ``` -### In HTML +With HTML Add a class of `js-isotope` to your element. Options can be set in JSON in `data-isotope-options`. ``` html -