Diego Diego - 2 years ago 143
Javascript Question

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

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


maxHeight: foo.height(),
minHeight: foo.height()

But this is really ugly, especially if I have to change the element's height programmatically.

Thanks in advance.


Answer Source

You could set the resize handles option to only show on the left and right (or east/west), like this:

    handles: 'e, w'

You can give it a try here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download