Sorry for the late reply.

Paul (or somebody else),
I have now tried to affect the ui.item, as you suggest in the
following ways:

In Draggable:
stop: function(e,ui){
        ui.item = $('<li>Stop test 1 - from Draggable</li>');
}

stop: function(e,ui){
        ui.item = '<li>Stop test 1 - from Draggable</li>';
}



in Sortable:
stop: function(e,ui){
        ui.item = $('<li>Stop test 2 - from Sortable</li>');
}
stop: function(e,ui){
        ui.item = '<li>Stop test 2 - from Sortable</li>';
}


I have tried both from the draggable and sortable, individually and at
the same time, but with no results.

I didn't know if I should set the ui.item to a jQuery object or with
just a string, so i've tried both, but with no luck at all.

If you could show an example that should work, then I would appreciate
it.

Thank you very much



On 19 Nov., 11:29, "Paul Bakaus" <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> you have to use the 'stop' callback and then modify the newly appended item,
> which should be ui.item.
>
> Cheers,
> Paul
>
>
>
> On Sat, Nov 15, 2008 at 12:10 AM, Steen Nielsen <[EMAIL PROTECTED]> wrote:
>
> > I am having some challenges here.
> > I was wondering if it was possible to drag a very simple list-item
> > onto a sortable list and when releasing the draggable, append a
> > different kind of HTML to this sortable list..?
>
> > Lets say that we have the following two lists:
>
> > <ul class="draggableElements">
> >  <li><span>label and textbox</span></li>
> >  <li><span>label and textarea</span></li>
> >  <li><span>label and checkbox group</span></li>
> >  <li><span>label and radiobutton group</span></li>
> > <ul>
>
> > <ul class="sortableList">
> >  <li><label>[labeltext]</label><input type="text" value="textbox
> > text" /></li>
> >  <li><label>[labeltext]</label><textarea>textarea text</textarea></
> > li>
> >  <li><label>[labeltext]</label><input type="checkbox" value="1" /></
> > li>
> >  ....
> > </ul>
>
> > When dragging a list item from the "draggableElements" list onto the
> > "sortableList", is it then possible to change the content of the
> > dragged element..? So that it changes from being a very simple
> > description text to an actual label and input field?
>
> > I have got the dragging part from one list to another working, so it
> > is just the transformation, that I am looking for.
> > I have thought of using the beforeStop element to change either the
> > ui.helper or ui.item. But it doesn't seem to affect anything.
>
> > I am looking forward to your replies.
>
> > Yours sincerely
> > Steen Nielsen
>
> --
> Paul Bakaus
> UI Architect
> --http://paulbakaus.comhttp://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