Horizontal line / handle, that once clicked and dragged, makes upper div decrease in size while bottom div increase, and vice versa. The idea is to implement a similar splitter to the one present on JSFiddle four windows interface.
Asked
Active
Viewed 1,934 times
0

Lombas
- 1,000
- 1
- 8
- 24
1 Answers
0
The implementation Demo on JSFiddle is here
Javascript:
$(function() {
var bottomElem = $(".resizable-bottom");
var bottomElemOriginalHeight = bottomElem.height();
$(".resizable-top").resizable({
handles: 's',
resize: function(event, ui) {
bottomElem.height(bottomElemOriginalHeight - (ui.element.outerHeight() - ui.originalSize.height));
},
stop: function(event, ui) {
bottomElemOriginalHeight = bottomElem.height();
},
//This has the effect of minHeight for bottomElem
maxHeight: $(".resizable-top").height()
});
});

Lombas
- 1,000
- 1
- 8
- 24