Search and Top Navigation
#3864 closed bug (fixed)
Opened January 16, 2009 11:02PM UTC
Closed January 19, 2009 12:01PM UTC
ui.item.prev() and ui.item.next() function differently than in previous version of Sortable
Reported by: | headchem | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 1.7 |
Component: | ui.sortable | Version: | 1.6rc5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When I move items to the very top of a list, this following block of code does not function like it used to. Previously, moving an item to the top of the list (in my example), would return nextId = 234, currentId = 123, prevId = undefined. Now nextId = '' (empty string), currentId = 123, prevId = undefined. The nextId equaling empty string is the problem. None of my code changed, except I upgraded to UI 1.6 RC5 and jQuery 1.3
obj.sortable({ axis: "y", cursor: "move", update: function(e, ui) { var prevId = ui.item.prev().attr("id"); var currentId = ui.item.attr("id"); var nextId = ui.item.next().attr("id"); } });