I wonder why 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With