Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/jquery.columnizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
width: 400,
// optional # of columns instead of width
columns : false,
// Optional, The width of a column can grow to maxColWidth (padding included!).
// Columns will be added if the the container is wider
maxColWidth:false,
// true to build columns once regardless of window resize
// false to rebuild when content box changes bounds
buildOnce : false,
Expand Down Expand Up @@ -433,6 +436,13 @@
numCols = $cache.find(prefixTheClassName("columnbreak", true)).length + 1;
optionWidth = false;
}

if ( options.maxColWidth ){
numCols=1;
while ( ( numCols * options.maxColWidth ) < $inBox.width() ) {
++numCols;
}
}

// if ($inBox.data("columnized") && numCols == $inBox.children().length) {
// return;
Expand Down