Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set snap to multiple elements

I have set my snap element of the draggable like so:

$('#id_num_'+id_num).draggable({snap:'.time_column', snapMode:'inner'})

How do I set up my draggable element to snap to two different elements or classes...like so:

$('#id_num_'+id_num).draggable({snap:'.time_column', '.**other class**', snapMode:'inner'})
like image 614
sugarmuff Avatar asked Dec 20 '22 06:12

sugarmuff


1 Answers

How about

$('#id_num_'+id_num).draggable({snap:'.time_column,.other_class', snapMode:'inner'})
like image 140
Musa Avatar answered Dec 30 '22 09:12

Musa