Skip to content

Instantly share code, notes, and snippets.

@trullock
Created August 12, 2012 18:26
Show Gist options
  • Save trullock/3333568 to your computer and use it in GitHub Desktop.
Save trullock/3333568 to your computer and use it in GitHub Desktop.
$(window).smartresize(function () {
var width = $grid.width();
var cols = Math.floor(width / 245);
var colWidth = Math.floor(width / cols);
console.log('cols: ' + cols);
console.log('colWidth: ' + colWidth);
$cells.width(colWidth - 20);
$grid.isotope({
masonry: { columnWidth: colWidth }
});
}).smartresize();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment