开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜