diff --git a/src/jquery.multisortable.js b/src/jquery.multisortable.js index e43afaf..773f006 100644 --- a/src/jquery.multisortable.js +++ b/src/jquery.multisortable.js @@ -51,6 +51,8 @@ } else if (prevIndex > myIndex) { shift_range = item.nextUntil('.multiselectable-previous').add(prev).add(item); + } else { + shift_range = item; } shift_range.addClass(options.selectedClass).addClass('multiselectable-shift'); } @@ -251,4 +253,4 @@ items: 'li' }; -}(jQuery); \ No newline at end of file +}(jQuery);