aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorEduardo Lundgren <eduardolundgren@gmail.com>2008-06-29 14:34:14 +0000
committerEduardo Lundgren <eduardolundgren@gmail.com>2008-06-29 14:34:14 +0000
commite73d019dffe19e6b8a7b0659d8da4293ae3ea3ae (patch)
treefaa7d0d84de066a49b6a38a529348c4e2ff45433 /ui
parentfbdb9f08a92ea5496314dcfb25cfcb2b2cad2a8c (diff)
downloadjquery-ui-e73d019dffe19e6b8a7b0659d8da4293ae3ea3ae.tar.gz
jquery-ui-e73d019dffe19e6b8a7b0659d8da4293ae3ea3ae.zip
Sortable - fixed #3048
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.sortable.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/ui.sortable.js b/ui/ui.sortable.js
index 17ee71281..52779026f 100644
--- a/ui/ui.sortable.js
+++ b/ui/ui.sortable.js
@@ -332,7 +332,7 @@ $.widget("ui.sortable", $.extend($.ui.mouse, {
//Create and append the visible helper
this.helper = typeof o.helper == 'function' ? $(o.helper.apply(this.element[0], [e, this.currentItem])) : this.currentItem.clone();
- if(!this.helper.parents('body').length) this.helper.appendTo((o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)); //Add the helper to the DOM if that didn't happen already
+ if (!this.helper.parents('body').length) $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(this.helper[0]); //Add the helper to the DOM if that didn't happen already
this.helper.css({ position: 'absolute', clear: 'both' }).addClass('ui-sortable-helper'); //Position it absolutely and add a helper class
/*
@@ -533,7 +533,7 @@ $.widget("ui.sortable", $.extend($.ui.mouse, {
},
rearrange: function(e, i, a, hardRefresh) {
- a ? a.append(this.currentItem) : i.item[this.direction == 'down' ? 'before' : 'after'](this.currentItem);
+ a ? a[0].appendChild(this.currentItem[0]) : i.item[0].parentNode.insertBefore(this.currentItem[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
//Various things done here to improve the performance:
// 1. we create a setTimeout, that calls refreshPositions