Through the wonders of jQuery 1.2.6, jQuery UI 1.6rc2/4 and LiveQuery, I am
able to make divs that are generated after the page load be draggable via
something like so:

        $(".results_container").livequery(function() {
            $(this).draggable({
                helper: 'clone',
                cursor: 'move',
                revert: 'invalid',
                start: function(ev, ui) {
                    var title = $.trim(
$(this).children("div.results_title").text() );

                    $(ui.helper).addClass("my_dragged").html(draggedObj)
                        .data("title", title);
                }
            });
        });

Now I'm trying to convert to jQuery 1.3b2 and haven't yet had any luck.  My
first step was to simply replace 1.2.6 with 1.3b2 and continue using
LiveQuery.  It feels like the events get registered, but when I drag, it
seems as though the start function isn't being called (which is confirmed by
setting Firebug breakpoints within the function that aren't triggered).

I'd of course prefer to use the new $.live functionality, but can't figure
out how.  There are other events in my code that I register as:

  $(".foo").livequery("click", function() { ...

that I can convert to

  $(".foo").live("click", function() { ...

and they work both ways with 1.2.6 and 1.3b2.  It's just that

  $(".foo").livequery(function() { $(this).draggable({ ...

that I can't seem to get working either way (LiveQuery or $.live).  Besides
the helper not being generated, the drop event isn't caught either, so the
whole drag & drop is broken.

Anyone have any ideas?  Thanks!

Reply via email to