L
L
Leonid2015-12-14 23:20:16
PHP
Leonid, 2015-12-14 23:20:16

How to implement a JavaScript interface for moving “cards” between “trays”?

You need to make such an interface in JavaScript:
8a830e7b7f664a3c9a20968330efecfe.png

the essence is simple: there are trays with cards with Surnames inside, the user grabs any card and drags it to any tray (for example, Ivanov grabs the card and drags it to tray 2), then clicks on the Save button and I in PHP I get an array of trays with nested arrays of cards inside.

Can anyone suggest a ready-made JavaScript library, or even better a jQuery plugin?

The standard Jquery UI has Droppable ( jqueryui.com/droppable ), but you will have to finish a lot, but I would like something closer to the task and semi-finished.

Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander N++, 2015-12-14
@sanchezzzhak

jquery sortable

$( ".block-card" ).sortable({
      items: ".item"   // див который перетаскиваем item
      connectWith: ".connectedSortable"  // класс контейнер лоток
    }).disableSelection();

jsfiddle.net/2rYqu

A
Alexander Wolf, 2015-12-15
@mannaro

Use this lib: rubaxa.github.io/Sortable

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question