2016-02-25 84 views

回答

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() 

}); 

});

相關問題