Skip to content
Permalink
Browse files

draggable: connectToSortable couldn't accept strings (fixes #3984)

  • Loading branch information
Paul Bakaus
Paul Bakaus committed Jan 29, 2009
1 parent d18d1a2 commit 3b92895a7e5b89815e66a051d432cdf67f6646cc
Showing with 2 additions and 2 deletions.
  1. +1 −1 demos/draggable/sortable.html
  2. +1 −1 ui/ui.draggable.js
@@ -18,7 +18,7 @@
revert: true
});
$("#draggable").draggable({
connectToSortable: ['#sortable'],
connectToSortable: '#sortable',
helper: 'clone',
revert: 'invalid'
});
@@ -436,7 +436,7 @@ $.ui.plugin.add("draggable", "connectToSortable", {
$(o.connectToSortable).each(function() {
// 'this' points to a string, and should therefore resolved as query, but instead, if the string is assigned to a variable, it loops through the strings properties,
// so we have to append '' to make it anonymous again
$(this+'').each(function() {
$(typeof this == 'string' ? this+'': this).each(function() {
if($.data(this, 'sortable')) {
var sortable = $.data(this, 'sortable');
inst.sortables.push({

0 comments on commit 3b92895

Please sign in to comment.
You can’t perform that action at this time.