Skip to content

Commit

Permalink
fix keepOrder on init (fix #131)
Browse files Browse the repository at this point in the history
  • Loading branch information
lou committed Apr 11, 2014
1 parent e7633a0 commit 6016d4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/jquery.multi-select.js
Expand Up @@ -383,8 +383,8 @@
}
});
} else {
if (that.options.keepOrder){
var selectionLiLast = that.$selectionUl.find('.ms-selected');
if (that.options.keepOrder && method !== 'init'){
var selectionLiLast = that.$selectionUl.find('.ms-selected');
if((selectionLiLast.length > 1) && (selectionLiLast.last().get(0) != selections.get(0))) {
selections.insertAfter(selectionLiLast.last());
}
Expand Down

0 comments on commit 6016d4b

Please sign in to comment.