I’ve used a drag and drop plugin before and it got the job done. On a different project I need something similar again but I’m wondering if it can be refined/simplified at all. Here’s a CodePen example of what I’ve used before:
I was wondering is there a way, maybe using the
data- attribute where a class of word-1 would only be accepted by
data-accept="word-1 for example? I’ve tried playing around with this but I’m not having much luck.
Another aspect would be to get the width of the draggable word and apply it to relevant droppable area – that’s in the current CodePen example.
Hope someone can help with this, can’t see the wood for the trees at the minute!