Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ Columnizer will add CSS classes to the columns it creates. Each column will have
<td style="text-align: right; padding-right: 10px;"><em>manualBreaks</em></td>
<td style="padding-left: 10px;">Defaults to false. Set to true if you only want to create columns with manual column breaks. If true, then width, height, columns options are ignored.</td>
</tr>
<tr>
<td style="text-align: right; padding-right: 10px;"><em>disableSingle</em></td>
<td style="padding-left: 10px;">
Disables single column layout if number of columns is less or equal to 1. Useful to force columns scrolling horizontally on small screens. See <a href="http://welcome.totheinter.net/autocolumn/sample5.html">demo 5</a> for an example.</td>. Default is false.
</td>
</tr>
</tbody>
</table>

Expand Down
5 changes: 4 additions & 1 deletion src/jquery.columnizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
precise : false,
// don't automatically layout columns, only use manual columnbreak
manualBreaks : false,
// disable single column layout when container width < columnWidth
// (useful for horizontally scrollable columns in mobile view)
disableSingle : false,
// previx for all the CSS classes used by this plugin
// default to empty string for backwards compatibility
cssClassPrefix : "",
Expand Down Expand Up @@ -471,7 +474,7 @@
// if ($inBox.data("columnized") && numCols == $inBox.children().length) {
// return;
// }
if(numCols <= 1){
if(numCols <= 1 && ! options.disableSingle){
return singleColumnizeIt();
}
if($inBox.data("columnizing")) return;
Expand Down
6 changes: 3 additions & 3 deletions src/jquery.columnizer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.