Created
March 2, 2012 15:52
-
-
Save mxriverlynn/1959279 to your computer and use it in GitHub Desktop.
resize kendo splitter to full vertical height of window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#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