Hi there,

the good news is that you don't need to make them draggable - only apply
the sortables, and the items can be dropped on droppables automatically.

That means, if you have a sortable list with li's, simply create the
droppables with
the accept option set to 'li' for example.

Cheers,
Paul

On Mon, Nov 17, 2008 at 5:38 PM, Gerrit <[EMAIL PROTECTED]> wrote:

>
> Hi All,
>
> I discovered that the issue is not with the xml or Spry but with an
> option for the draggable  elements.
>
> Basicly I have a list that is sortable, but the <li> items also need to
> be draggable so they can be dropped in a drop area so that they are
> removed form the list.
>
> The sortable works, the draggable wo0rks, but when combined things get
> weird:
> without the clone for draggable the sort is fine but dragging list items
> to the drop box does not look good (maybe not in this sample) .
>
> with the clone  when I sort an item the original item stays in its place
> and and a copy is placed in the new location where I dragged it to.
>
> FYI This can be achieved with prototype/scriptalicous Sortable
>
> <ul id="myList">
> <li id="foo-1" class="sortitem">Lorem</li>
> <li id="foo-2" class="sortitem">Foo</li>
> <li id="foo-3" class="sortitem">Bar</li>
> <li id="foo-4" class="sortitem">Ipsum</li>
> </ul>
>
>  $('.sortitem').draggable({helper:'clone',connectToSortable:'#mylist'});
>  //   $('.sortitem').draggable({connectToSortable:'#mylist'});
>       $('#mylist').sortable();
>
>
> So the big question is can you create a list that is sortable but can
> also work with draggable so that an item can be dragged to another
> location.
>
> Regards,
>
> Gerrit Kuilder
>
>
>
> gerkuil wrote:
> > Hi All,
> >
> > started looking into jquery and managed to get some drag/drop things
> > going, this is working nicely.
> >
> > The lists are created with adobe spry and xml data (you can output the
> > xml in your html, instead of creating the html in JavaScript, which is
> > nice)
> >
> > I have problems  with a sortable list, also from xml and also a
> > draggable list. I can sort items and it gets placed in the new
> > location but the item then appears  twice, once in the new location,
> > once in the original location.
> >
> > >From the data posted it is impossible to find out what the original
> > and new positions are (I cannot use serialize because the id of the
> > item is used for a pointer of what needs to be dropped, and I am
> > wondering if in my update function I can somehow find out what item
> > was being dragged and on which position it has ended up.
> >
> > So far I haven't found anything that gave me an idea, any pointers
> > will be appreciated.
> >
> > Regards,
> >
> > Gerrit
> >
> > >
> >
> >
>
>
> >
>


-- 
Paul Bakaus
UI Architect
--
http://paulbakaus.com
http://www.linkedin.com/in/paulbakaus

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to