diff options
author | Felix Nagel <info@felixnagel.com> | 2012-01-22 14:47:21 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-01-22 14:47:21 +0100 |
commit | 21d96f12f802f13c4c159ab9b2e0a6df3771be42 (patch) | |
tree | c74f69270a62bc8a99e175bd3a94c7bc18433a48 /ui/jquery.ui.sortable.js | |
parent | 725023e30db10cc0a3ec2b8b9fda0ec80a4ab496 (diff) | |
parent | 6800e1a2f97a7d8aaf20d065aa2ce517528e5068 (diff) | |
download | jquery-ui-21d96f12f802f13c4c159ab9b2e0a6df3771be42.tar.gz jquery-ui-21d96f12f802f13c4c159ab9b2e0a6df3771be42.zip |
Merge branch 'master' of github.com:jquery/jquery-ui into selectmenu
Diffstat (limited to 'ui/jquery.ui.sortable.js')
-rw-r--r-- | ui/jquery.ui.sortable.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index 62d227a3d..600569451 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -17,6 +17,7 @@ $.widget("ui.sortable", $.ui.mouse, { version: "@VERSION", widgetEventPrefix: "sort", + ready: false, options: { appendTo: "parent", axis: false, @@ -58,6 +59,9 @@ $.widget("ui.sortable", $.ui.mouse, { //Initialize mouse events for interaction this._mouseInit(); + + //We're ready to go + this.ready = true }, @@ -571,7 +575,7 @@ $.widget("ui.sortable", $.ui.mouse, { var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]]; var connectWith = this._connectWith(); - if(connectWith) { + if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down for (var i = connectWith.length - 1; i >= 0; i--){ var cur = $(connectWith[i]); for (var j = cur.length - 1; j >= 0; j--){ |