如何将捕捉设置为多个元素

时间:2013-04-27 23:12:46

标签: jquery jquery-ui jquery-ui-draggable

我已设置了draggable的snap元素,如下所示:

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

如何设置我的可拖动元素以捕捉到两个不同的元素或类......就像这样:

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

1 个答案:

答案 0 :(得分:11)

怎么样

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