diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2009-01-20 16:34:21 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2009-01-20 16:34:21 +0000 |
commit | 1805e7827f3b81fc4d4987a223ecede0334626d3 (patch) | |
tree | d17611f02b7cddd16ea1f68c946c6bd93d87e56c /ui/ui.sortable.js | |
parent | 19aef25f7960c5cfc71e9e2c3cae78f2c9384196 (diff) | |
download | jquery-ui-1805e7827f3b81fc4d4987a223ecede0334626d3.tar.gz jquery-ui-1805e7827f3b81fc4d4987a223ecede0334626d3.zip |
sortable: connectWith should accept string selectors (fixes #3892, backward compatibility still existant)
Diffstat (limited to 'ui/ui.sortable.js')
-rw-r--r-- | ui/ui.sortable.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/ui.sortable.js b/ui/ui.sortable.js index aa9724793..54b136efc 100644 --- a/ui/ui.sortable.js +++ b/ui/ui.sortable.js @@ -469,8 +469,9 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, { var queries = []; if(this.options.connectWith && connected) { - for (var i = this.options.connectWith.length - 1; i >= 0; i--){ - var cur = $(this.options.connectWith[i]); + var connectWith = this.options.connectWith.constructor == String ? [this.options.connectWith] : this.options.connectWith; + for (var i = connectWith.length - 1; i >= 0; i--){ + var cur = $(connectWith[i]); for (var j = cur.length - 1; j >= 0; j--){ var inst = $.data(cur[j], 'sortable'); if(inst && inst != this && !inst.options.disabled) { |