0

I try Jquery UI Dragabble, and I want to snap to a class of elements, but to not snap to an element which is part of that class (Sorry for my English). I mean something like this:

$( "#selected" ).draggable({
    snap: ".elements",
    snapCancel: "#special_element"
})
empiric
  • 7,825
  • 7
  • 37
  • 48
Tamás
  • 950
  • 2
  • 10
  • 29

1 Answers1

0

I don't know if understand it correctly but you can try something like this:

$( "#selected" ).draggable({
    snap: ".elements:not(#special_element)"
});

Demo

empiric
  • 7,825
  • 7
  • 37
  • 48