Open ghaliano opened 10 years ago
From documentation:
$containers.on "ss-rearranged", (e, selected) ->
console.log "This container:", $(this)
console.log "Has rearranged this item:", $(selected)
console.log "Into this position:", $(selected).index()
$(selected)
is before position
$(selected).index()
is new position. you can store these into variables and use AJAX to send to PHP database for positioning. Then load your ordering from the database on the PHP page load
I am trying to do this, but I want to detect the target element, even if it is outside of the main container - is that possible?
Hi,
in my case i need to send an ajax request to switch dragged element rank in the database so i need the dragged and dropped element after drop complete
my js code look like this:
but I don’t found any useful attribute to get this two informations
Thanks