The 'snap-to-grid/element' is not built-in functionality in current version. The example below shows how to implement the 'snap-to-grid' functionality:
<div id="dd" style="width:300px;height:300px;border:1px solid #ccc"></div>
$(function(){
$('#dd').draggable({
onStartDrag:function(e){
e.data.lastLeft = e.data.left;
e.data.lastTop = e.data.top;
},
onDrag:function(e){
var dx = Math.floor((e.data.left-e.data.lastLeft)/20)*20;
var dy = Math.floor((e.data.top-e.data.lastTop)/20)*20;
if (Math.abs(dx)>=20){
e.data.lastLeft += dx;
}
if (Math.abs(dy)>=20){
e.data.lastTop += dy;
}
$(this).css({
left:e.data.lastLeft,
top:e.data.lastTop
});
return false;
},
onStopDrag:function(e){
$(this).css({
left:e.data.lastLeft,
top:e.data.lastTop
})
}
})
})