By Default, jQuery UI will not add draggable to elements of type button
.
According to the API for the Cancel
Option:
Prevents dragging from starting on specified elements.
Default:"input,textarea,button,select,option"
If you'd like to be able to use Draggable on buttons, you have to override the cancel option by specifying cancel: false
$('.btn.verticalButton').draggable({cancel:false});
Working Demo in jsFiddle
Or you can try changing your button
element to an a
nchor element:
<a class="btn btn-default">B1</a>
Anchor Test Fiddle
Also, the helper
option function you're using seems to be interfering with the drag operation.
In order to use connectToSortable
, you should use helper: "clone"
.