1
In the Below image, I have several columns where the user can drag the div and put it in another column, as illustrated in the image:
I’m using Sortable of Jquery-UI. I can drag this div to the other column without major problems with the code below:
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
<script>
$( function() {
$( "#sortable1, #sortable2" ).sortable({
connectWith: ".connectedSortable"
}).disableSelection();
} );
</script>
I would like to continue this information in the database, that is, when the user returned to the page divs
would be in the place he left.
Can someone help me in how to do?
Update the database to create and change are action is to use ajax, but there is already download plugin has q search "drag" and do not remember the right name.
– KingRider
this is called drag and drop, I can drag normally, however I would like when drag, I update the database.
– Sr. André Baill
I get it, if you’ve done drag and drop, use div + bind + onchange to work and write action, if you can post your code we can help.
– KingRider
I posted them all, there was one missing there?
– Sr. André Baill
But this used PHP? poste http://www.phpfiddle.org (Note: no php tags?)
– KingRider
Yeah, I didn’t update the database, just the part that drags the business to div next door... so everything I did, it’s here.
– Sr. André Baill
@Andrébaill is practically this Fiddle, you only have to adapt it. https://jsfiddle.net/k0owpLLx/
– Marconi