How to resize ONLY horizontally or vertically with jQuery UI Resizable?

前端 未结 7 2263
长情又很酷
长情又很酷 2020-12-12 23:29

The only solution I\'ve found is to set the max and min height or width with the current value.

Example:

foo.resizable({ 
  maxHeight: foo.height(),          


        
7条回答
  •  既然无缘
    2020-12-13 00:02

    I wanted to allow re-size the width when browser re-sizes, but not when user changes the size of element, this worked fine:

    foo.first().resizable({
        resize: function(event, ui) { 
        ui.element.css('width','auto');
        },
    }); 
    

提交回复
热议问题