Is it possible to constrain a draggable shape to only be dragged over a set div or area?
I’m using jQuery.
Poelinca, thanks for your reply. Using the ‘containment’ option in the draggable parameters I managed to fix my issue.
$(“.item”).draggable({
containment: ‘#wrapper’
});
Check the containment option for the draggable widget from jQuery UI .
Or you can use axis option to :
You can find here some examples.