JQuery resizable snap to other resizable objects' borders?
I wonder wh开发者_如何学Pythony they didn't develope JQuery resizable with option to snap the resizing object to others (instead of snapping to grid) like draggable ? Does anyone know such a plugin to achieve this ? Thanks.
Think this should do the trick:
https://github.com/polomoshnov/jQuery-UI-Resizable-Snap-extension
For me this javascript add-on provided didn't work, maybe because it's some years outdated. Instead I found a simpliest solution that uses only an original attribute from the JQuery-UI's library.
On the dialog you want to snap, just make something like:
$('.your-dialog-filter').dialog().parents('.ui-dialog').draggable('option', 'snap', true);
Simple like this.
More info and demo: https://jqueryui.com/draggable/#snap-to
精彩评论