Hi,
What I had to do to get that to work(doing exactly what you are
doing), was once the new content was loaded from the AJAX call,
destroy and "re-drag" the loaded divs...

Something like this

$ajax...

success:
   ..somestuff...
   ..load new content...
   $('.classname').draggable('destroy');
   $('.classname').draggable({helper: 'clone',handle: 'div',appendTo:
'body',zindex:1000,cursorAt: {top: 7, left: 25} });

Try something like this..I know I spent a day figuring out what needed
to be done..

T.

On Feb 5, 1:17 pm, DReed <danreed...@gmail.com> wrote:
> Hi There.  I am new to jQuery and I have a question.  I was able to
> get the drag/drop functionality working, very slick.
>
> For an example, I have some HTML in one <div> which has a "droppable"
> point, and HTML in another <div> which has many "draggable" points.  I
> can drag and drop and all is well.
>
> The next step is to source the HTML for each <div> from an AJAX call,
> which I have done.  The problem is, after it loads, the DRAG/DROP
> doesn't work.  The "draggable" elements are no longer draggable.
>
> my code is pretty simple:
>
> $("#leftside").load("draggable.html");
> $("#pane2").load("droppable.html");
>
> Could it be that I have to do this load with a callback and then
> assign which classes are draggable in the callabck for the "draggable"
> content, and then do the same for the "droppable"?
>
> Sorry, I would have posted the source but it is in pieces right now
> will I am trying different things.
>
> Thanks in advance.

Reply via email to