JQuery Draggable with multiple handles

Is it possible to have an element draggablewith more than one descriptor?

I initialize it twice, each time with a different handle parameter, but it does not work - only the first one works.

+5
source share
2 answers

You only need to pass the "handle" parameter once, and it can be either a selector or elements (/ s).

So that it works with multiple handles:

$(elem).draggable({
    handle: '#handle1, #handle2',
});

Additional information / source: http://docs.jquery.com/UI/Draggables/draggable

+15
source

Of course. Just select these handlers.

For example:

$(element).Draggable({handle:'.handler'});
+3

All Articles