desandro / draggabilly

:point_down: Make that shiz draggable
https://draggabilly.desandro.com
MIT License
3.86k stars 387 forks source link

pass handle as element???... #209

Closed mikila85 closed 2 years ago

mikila85 commented 4 years ago

why not allow to pass handle as element???

desandro commented 4 years ago

Thanks for this feature request. Add a 👍 reaction to this issue if you would like to see handle be set with an Element. added. Do not add +1 comments — They will be deleted.

desandro commented 2 years ago

Draggabilly v3 has been released, now with updated handle behavior. You can set it to a single element or a Array or NodeList of elements

// select all .handle children with selector string
handle: '.handle'

// set as element
handle: element.querySelector('.handle')

// set as array or NodeList
handle: [ element.querySelector('.handle1'), element.querySelector('.handle2') ]

Please try it out and report back with any issues!