Skip to content

Instantly share code, notes, and snippets.

@mxriverlynn
Created March 2, 2012 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mxriverlynn/1959279 to your computer and use it in GitHub Desktop.
Save mxriverlynn/1959279 to your computer and use it in GitHub Desktop.
resize kendo splitter to full vertical height of window
$("#vertical").kendoSplitter({
orientation: "vertical",
panes: [
{ collapsible: false, resizable: false, size: "100px" },
{ collapsible: false },
{ collapsible: false, resizable: false, size: "100px" }
]
});
$("#horizontal").kendoSplitter({
panes: [
{ collapsible: true },
{ collapsible: false },
{ collapsible: true }
]
});
$(window).resize(function() {
resizeSplitter()
});
var resizeSplitter = function() {
var topHeight = 100;
var bottomHeight = 100;
var centerHeight = $(window).height() - (topHeight + bottomHeight);
var splitter = $("#vertical").data("kendoSplitter");
splitter.size("#topPane", topHeight + "px");
splitter.size("#middlePane", centerHeight + "px");
splitter.size("#bottomPane", bottomHeight + "px");
splitter.trigger("resize")
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment