desandro / draggabilly

:point_down: Make that shiz draggable

Home Page:https://draggabilly.desandro.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Two or more sets of draggable items?

WillyWilson1 opened this issue · comments

Is it possible to have more than one set of draggable items in their own container on the same page?

I have two sets which work fine for dragging, but not when it comes to dragend - which uses the selector '.draggable'.

I am using the draggie.on('dragEnd', function(e,p) to get position, but it does not take any extra variables.

This means that for the second set dragend is called twice - gives the correct values for top and left, but twice. All items have ids, so is there some way that I can use this?

WW

Hi,

Me again.

Figured it out - have used

var draggableElems = document.getElementsByClassName(D);

where D is an identifier.

WW