i am sorry but i can't figure out how the "connectWith" could help me. i tried giving both lists the same class and add this as connectWith value but it doesn't work at all (now it seems like it destoyed the draggable option of those elements).
remember, the two lists aren't visible at the same time (seperated tabs) and to add the element of the first list the image needs to get dropped on one Tab element. now it appears on the second list and this one just should be sortable. actually not too complicated but i am really struggeling :( dirk On 5 Feb., 14:02, Bohdan Ganicky <[email protected]> wrote: > Well, it seems that this is exactly what you > want:http://ui.jquery.com/demos/sortable/#connect-lists:) > > -- > Bohdan > > On Feb 5, 12:32 pm, dirk w <[email protected]> wrote: > > > hi bohdan, > > thanks for offering your help! i can't figure it out, even with the > > examples. > > > what works already: > > i have a list of images which are draggable. they can get dropped on > > various places on the site as well as on a Tab. > > if dropped on a Tab they appear (append()) to an other list. in this > > list they are still draggable (so you can still drop them on those > > various places). > > > the only thing i would like to do now is: > > the second list (where the elements appear after they got dropped on > > the tab) should be sortable. i mean people should drag those images > > around and arrange them new (like in this > > example:http://ui.jquery.com/demos/sortable/#display-grid) > > > i tried to just make the second list droppable, but this leads to > > problems with jquery (i get funny errors in firebug). i thought maybe > > its because this list gets new elements all the time, so i declared > > the second list as sortable every time a new item gets attached. but > > this leads to a similar odd error. > > > maybe i need to use the "connectToSortable" for my draggable elements, > > but i am not sure ho to use it. > > > your help is much appreciated! > > dirk > > > On 5 Feb., 12:10, Bohdan Ganicky <[email protected]> wrote: > > > > Hi Dirk, > > > check out the "Draggable + Sortable" > > > demo:http://ui.jquery.com/demos/draggable/#sortable > > > It could be a good starting point. Hope that helps. If not, let me > > > know and I'll try to help you more. > > > > -- > > > Bohdan > > > > On Feb 5, 11:23 am, dirk w <[email protected]> wrote: > > > > > hi bohdan, > > > > i changed my mind (since i just couldn't figure out how to do it like > > > > i wanted). from now on the elements will not get copied, there's > > > > always just one instance of an element (this is probably less > > > > confusing to the user). > > > > > but now i got a new problem, this time with sortable > > > > > i have 2 ULs with LIs (which contain just 1 IMG) > > > > it's possible to drag an LI from the first list on top of an TAB. if > > > > dropped on the tab than the LI gets added to the second list. that > > > > works fine. > > > > but i would like to make this second list sortable. > > > > so if you drop an element on the tab than this should get added to the > > > > second list AND should be sortable in this second list (And still > > > > drag&droppable). > > > > the way i add items to the seconds list is this: > > > > > // if result gets dropped on Playlist Tab than load it's Thumbnail and > > > > Data to the Playlist > > > > $(".playlist").droppable( > > > > { > > > > accept: ".searchResultEntry", > > > > hoverClass: "videoDropHover", > > > > drop: function(ev, ui) > > > > { > > > > if ($("#nextSongsList > > > > > .searchResultEntry").length < 14) > > > > { > > > > > > > > $("#nextSongsList").append(ui.draggable); > > > > } > > > > } > > > > }); > > > > > when i tried to make it sortable, than the items lost their draggable > > > > functionality :( > > > > > dirk > > > > > On 4 Feb., 16:27, Bohdan Ganicky <[email protected]> wrote: > > > > > > So you want the draggable to clone itself and still be draggable and > > > > > clonable again? Can you briefly describe the whole desired > > > > > functionality? > > > > > > -- > > > > > Bohdan > > > > > > On Feb 3, 6:26 pm, dirk w <[email protected]> wrote: > > > > > > > oh, that's odd. on the second sight it doesn't work. > > > > > > by using .append(ui.draggable.clone()); the clone seems to be not > > > > > > draggable anymore. > > > > > > by making it draggable (directly after it got cloned) it seems to > > > > > > get > > > > > > copied twice. > > > > > > > have you heard about that? > > > > > > > On 3 Feb., 18:09, dirk w <[email protected]> wrote: > > > > > > > > works like a charm, thanks > > > > > > > dirk > > > > > > > > On 3 Feb., 17:21, Bohdan Ganicky <[email protected]> wrote: > > > > > > > > > Hi, > > > > > > > > what about this: > > > > > > > > > $('.draggable').draggable({ > > > > > > > > helper: 'clone'}); > > > > > > > > > $('#droppable').droppable({ > > > > > > > > accept: '.draggable', > > > > > > > > drop: function(ev, ui) { > > > > > > > > $(this).append(ui.draggable.clone()); > > > > > > > > } > > > > > > > > > }); > > > > > > > > > -- > > > > > > > > Bohdan > > > > > > > > > On Feb 3, 3:51 pm, dirk w <[email protected]> wrote: > > > > > > > > > > hello ui community! > > > > > > > > > i would like to drop a draggable object and than append() it > > > > > > > > > to an > > > > > > > > > other list. > > > > > > > > > > but i dislike that the draggable object than get's removed > > > > > > > > > from it's > > > > > > > > > original place (i mean the place where it was before dropping > > > > > > > > > it) > > > > > > > > > > is it possible to create a copy of the draggable object and > > > > > > > > > than > > > > > > > > > appending this one to the second place? so the real draggable > > > > > > > > > object > > > > > > > > > would still stay at it's original place. > > > > > > > > > > your help is much appreciated > > > > > > > > > dirk --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
