Module-documentation

version 1.0.0
module: drag
maintanance: Marco Asbreuk
home
all modules

Delegate draggable

Multiple items can be made draggable by specify draggable="css-selector" at a container-Element. Make sure that -when delegate- the delegated items have the same CSS as [draggable] has.

Drag the items, they are all draggable.

drag me
drag me
drag me
drag me
drag me

Code-example:

<style>
    /* give delegated items the same CSS as [draggable]: */
    .base-container div {
        -moz-user-select: none;
        -khtml-user-select: none;
        -webkit-user-select: none;
        user-select: none;
        float: left;
        position: relative;
    }
    .base-container div:not(.dd-dragging) {
        cursor: default;
    }
</style>
<body>
    <div class="base-container" plugin-dd="true" dd-draggable="div">
        <div>drag me</div>
        <div>drag me</div>
        <div>drag me</div>
        <div>drag me</div>
        <div>drag me</div>
    </div>
</body>
<script src="itsabuild-min.js"></script>
API Docs