Skip to content

useParentHeight option #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
6 changes: 5 additions & 1 deletion src/jquery.columnizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
var defaults = {
// default width of columns
width: 400,
//This sets targetHeight to the parents height if it is true
useParentHeight:false,
// optional # of columns instead of width
columns : false,
// true to build columns once regardless of window resize
Expand Down Expand Up @@ -422,7 +424,9 @@
maxLoops = 1;
targetHeight = optionHeight;
scrollHorizontally = true;
}
} else if(options.useParentHeight) {
targetHeight = maxHeight;
}

//
// We loop as we try and workout a good height to use. We know it initially as an average
Expand Down