drop in element with css position: fixed;

28 views
Skip to first unread message

aharth

unread,
May 4, 2009, 2:28:50 PM5/4/09
to threedubmedia
Hi,

I'd like to fix my drop area at the top of a page so that users don't
have to scroll
during drag-and-drop. Currently, d-n-d only works when I pick up the
element,
scroll to the top of the page, and then drop it.

Any idea what I can do to enable drag-and-drop with a fixed drop
target area?

Cheers,
Andreas.

3wme

unread,
May 8, 2009, 9:53:06 AM5/8/09
to threedubmedia
You need to call "$.dropManage();" every time the target's page
position changes. In this case when position is fixed, the page
position changes when the window or container scrolls or resizes. So
you can bind a handler to those events and manage your drop targets.
Alternatively you could call "$.dropManage" inside of the drag
handler, though this can negatively impact performance on pages with
many drop targets.

Andreas Harth

unread,
May 12, 2009, 10:03:16 AM5/12/09
to threed...@googlegroups.com
Hi 3wme,

3wme wrote:
> You need to call "$.dropManage();" every time the target's page
> position changes. In this case when position is fixed, the page
> position changes when the window or container scrolls or resizes. So
>

cool, works as advertised.

Many thanks,
Andreas.

Reply all
Reply to author
Forward
0 new messages