Skip to content

Commit

Permalink
Merge pull request #21 from falconwhite/master
Browse files Browse the repository at this point in the history
Fix for disappearing grid if col lower than 1
  • Loading branch information
suprb committed Sep 17, 2013
2 parents 28e8152 + b2c5315 commit b7a75df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jquery.grid-a-licious.js
Expand Up @@ -103,6 +103,8 @@
_setCols: function () {
// calculate columns
this.cols = Math.floor(this.box.width() / this.options.width);
//If Cols lower than 1, the grid disappears
if (this.cols < 1) { this.cols = 1; }
diff = (this.box.width() - (this.cols * this.options.width) - this.options.gutter) / this.cols;
w = (this.options.width + diff) / this.box.width() * 100;
this.w = w;
Expand Down Expand Up @@ -366,4 +368,4 @@
return this;
}

})(jQuery);
})(jQuery);

0 comments on commit b7a75df

Please sign in to comment.