Connecting callbacks
Six of the available callbacks can be used in conjunction with connected sortables. These events fire at different times during an interaction, alongside the events that we have already looked at.
Like the standard unconnected events, not all of the connected events will fire in any single interaction. Some events, such as over
, off
, remove
, and receive
will fire only if a sort item moves to a new list.
Other events, such as activate
and deactivate
, will fire in all executions, whether any sort items change lists or not. Additionally, some connected events, such as activate
and deactivate
, will fire for each connected list on the page. Provided at least one item is moved between lists, events will fire in the following order:
start
activate
sort
change
beforeStop
stop
remove
update
receive
deactivate
Let's now see some of these connected events in action. Change the final <script>
element in sortable10.html
, so that it appears as follows:
<script> $(document).ready(function...