@profiscience/knockout-contrib-bindings-draggable
v1.1.2
Published
[![Version][npm-version-shield]][npm] [![Dependency Status][david-dm-shield]][david-dm] [![Peer Dependency Status][david-dm-peer-shield]][david-dm-peer] [![Dev Dependency Status][david-dm-dev-shield]][david-dm-dev] [![Downloads][npm-stats-shield]][npm-sta
Downloads
14
Readme
bindings.draggable
This package is intended for consumption via the @profiscience/knockout-contrib metapackage
Drag and drop list re-ordering
Usage
<ul class="draggable-list-container" data-bind="foreach: foos">
<li class="draggable-item-container">
<i
class="fa fa-bars"
data-bind="draggable: {
listContainerSelector: '.draggable-list-container',
itemContainerSelector: '.draggable-item-container',
list: $parent.foos,
item: $data
}"
></i>
</li>
</ul>
.draggable-list-container {
/* position must be anything BUT static */
position: relative;
}