When moving a droppable after draggable has started, drop spots don't come with it

When moving a droppable after draggable has started, drop spots don't come with it


I have a draggable and a droppable on the same page, but the draggable
is on the bottom and the droppable at the top of the page. As a
result, when someone starts dragging, I would like to move the
droppable into view automatically for easy dropping.
It doesn't work however due to the fact that the drop spot are
invisibly still in their original locations.
Is there a way for me to alert the plug-in to refresh it's sense of
where the elements are?
Here's a quick code sample to see what I'm up to:
<code>
var default_offset = $("#ssx").offset().top + $("#ssx").height();
$("a.tinyapp").draggable({
    appendTo: "body", zIndex: 100, containment: 'document', cursorAt:
{top: 16, left: 11 },
    helper: function(){
        return $(document.createElement('div')).addClass("add-
drag").html('<h4 class="dragged">' + $(this).parent().children("h4 >
a").html() + '</h4>').appendTo("body")[0];
    },
    start: function(){
        if($(window).scrollTop() >= $("#ssx").offset().top + $
("#ssx").height()){
            $("#ssx").animate({top:$(window).scrollTop() - $
("#ssx").offset().top}, 700);
        }
    },
    stop: function(){
        if($("#ssx").offset().top !== default_offset){
            t = setTimeout('$("#ssx").animate({top:0}, 700);',2000);
        }
    }
});
</code>

































    • Topic Participants

    • cg