Skip to main content

Search and Top Navigation

#3163 closed bug (worksforme)

Opened August 02, 2008 01:18AM UTC

Closed September 16, 2008 12:44PM UTC

Last modified August 26, 2009 02:00PM UTC

Nesting Sortables is not working - connecting all groups of same class

Reported by: mlang74 Owned by: paul
Priority: major Milestone: 1.7
Component: ui.sortable Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:

In a scenario where you want to connect mutliple sort groups in a single jQuery call the nested sortables do not work.

$('.contentGroup').sortable({items:'.contentArea', handle:'.moveButton', connectWith:'.contentGroup', opacity:'.5'});

I have a sample html file including the css, and page script. See attached.

Attachments (3)
  • Sortables_NestedError.html (3.3 KB) - added by mlang74 August 02, 2008 01:19AM UTC.

    Demonstrates that nested sortables are not working

  • Sortables_NestedError_r2.html (3.4 KB) - added by mlang74 September 03, 2008 01:53PM UTC.

    Example file updated with working resize event code

  • Sortables_NestedError_r3.html (3.3 KB) - added by mlang74 September 13, 2008 02:38AM UTC.

    Problem solution - added brackets around connectWith selector

Change History (6)

Changed August 02, 2008 01:22AM UTC by mlang74 comment:1

related to #1364

Changed August 02, 2008 01:23AM UTC by mlang74 comment:2

Correction, related to #3164

Changed September 03, 2008 02:06PM UTC by mlang74 comment:3

Nested sortables work using prototype and scriptaculous. however, I'd prefer to use jQuery for other library features. I also prefer the resizable feature of jQuery. For the resizing in scriptaculous I had to use a draggable that when dragged resized the parent element.

Here is an example of what I want to do with jQuery UI.

Changed September 13, 2008 02:25AM UTC by mlang74 comment:4

This is not a bug. I found the solution upon further inspection of the documentation. I was confused between the correct syntax to make it work in prototype and jQuery.

The solution is in how the connectWith option is specified.

$('.contentGroup').sortable({items:'.contentArea', handle:'.moveButton', connectWith:['.contentGroup'], opacity:'.5'});

Notice the brackets around the selector in the connectWith option.

However, sortables still do not work with resizable, see #3164

Changed September 13, 2008 02:26AM UTC by mlang74 comment:5

my comment was mangled... One more try.

$('.contentGroup').sortable({items:'.contentArea', handle:'.moveButton', connectWith:['.contentGroup'], opacity:'.5'});

Changed September 16, 2008 12:44PM UTC by paul comment:6

resolution: → worksforme
status: newclosed