我在我的应用程序中实现了kendoUI拆分器。我想动态改变拆分器的高度。我这样定义拆分器:
<div id="splitter" style="height:500px;width:100%">
<div id="leftPane"></div>
<div id="rightPane"></div>
</div>
$("#splitter").kendoSplitter({
panes: [
{ collapsible: true, size: "50%" },
{ collapsible: true, size: "50%" }
],
orientation: "horizontal",
});
我不想在窗格中显示滚动条。我想增加拆分器的高度,以便移除滚动条。你能告诉我如何实现它吗?
发布于 2013-05-22 07:25:59
要调整拆分器的大小,您可以执行以下操作:
// Get reference to the splitter
var splitter = $("#splitter").data("kendoSplitter");
// Set the new height to 600px
splitter.wrapper.height(600);
但是,由于splitter
中没有redraw
方法,您应该通过执行以下操作来trigger
resize
事件:
// Trigger a resize event in splitter to force a redraw.
splitter.trigger("resize");
https://stackoverflow.com/questions/16684452
复制相似问题