Zanderwar Zanderwar - 1 year ago 74
Javascript Question

Sortable panels, removing draggable functionality from certain elements within

I have a jQuery UI sortable list with multiple panels within.

Unfortunately due to the draggable functionality, it's impossible to highlight/copy any text within those panels.

Therefore, I need only the header (green bar of course) of the panel to be draggable and the panel body to be excluded from this functionality.


Anyone have any experience with this?

Current code is out-of-box standard:

connectWith: ".ui-dropzone",
placeholder: "ui-state-highlight"

Answer Source

Use the handle option to define selector that can be used to drag with

$( ".selector" ).sortable({
  handle: ".handle"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download