Anyone know how we can disable "Snap to Grid" from jQuery UI Draggable base on checkbox.
I m using below code to enable snap to grid dynamically.
$(".WidgetCl").draggable({containment: '#editorWindow',scroll: true, snap: ".gridCol", snapMode: "both", stop :function() {$(this).trigger("stopdrag");}})
$(".WidgetCl").draggable("option", "grid", [ gridSize, gridSize ]);
Thanks, Sonal
You have to set the grid option to false
to disable snap-to-grid:
$(".WidgetCl").draggable("option", "grid", false);