Ticket #2347 (closed bug: wontfix)
Sortable : callback called before sort really stop
| Reported by: | Nodashi | Owned by: | paul |
|---|---|---|---|
| Priority: | major | Milestone: | 1.2.4 |
| Component: | ui | Version: | 1.2.3 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
If you want to use a callback function when the sort stop/update this callback function is called before the sort stop. So you have a "ghost" of the element you want to move.
In my case i sort div elements that contains hidden input.
You can use this callback function to show the problem :
fonction(e, ui){
$('div.sortable input[class="order"]').each(function(i){
alert($(this).attr('name'));
}
)
}
however if you use console.log whith firebug you will not see this "ghost" element
Change History
comment:2 Changed 5 years ago by paul
- Status changed from new to closed
- Resolution set to wontfix
This is needed because some people want to still track changes on the helper in that callback. However, it's easy to filter out that element, because it has a helper class named 'ui-sortable-helper' assigned to it. So you could do
$('div.sortable input[class="order"]').not('.ui-sortable.helper')
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

I forgot i use the 1.5b version of UI ;)