jQuery UI resizable : auto height when using east handle alone

Posted by z33m on Stack Overflow See other posts from Stack Overflow or by z33m
Published on 2010-04-14T04:31:18Z Indexed on 2010/04/14 4:33 UTC
Read the original article Hit count: 449

i have a jqueryui re-sizable div. I want only the width to be re-sizable and the height to remain auto, so that the div grows or shrinks with the content. If i set it to display only the east handle and use css height:auto, after resize the height also gets set even though only the width changed. I have to set the height to auto on resize event everytime like so:

resize: function(event, ui) {
    $(this).css('height', 'auto');
}

to prevent the height from being set. Is there a better way to prevent the height from getting set when only the east handle is used?

© Stack Overflow or respective owner

Related posts about jquery-ui

Related posts about jQuery