List within Lightbox

Sep 9, 2009 at 4:15 PM

I am having trouble getting the dragsort to work when placed within a lightbox.  Using a plugin "colorbox" (, I am loading two lists that I would like to dragsort between.  The actual function of dragsorting works, but when you click and drag an element, it is offset by the colorbox/lightbox's offset within the window.  I have tried to modify the dragsort to figure out the real offset but have had little luck.  Anyone know how I could do this?

Sep 11, 2009 at 10:25 AM

Thanks for raising this issue, the problem is that when the dragged element is positioned absolutely the css left and top will be relative to the parent element that is position absolute which in this case is the colorbox div instead of the document. The solution would be to take the offset of the parent absolute element and take that off the x-y coordinates of the mouse cursor. However, when I do that it doesn't seem to work quite right with colorbox although it works perfectly in a simple test case. However, what does seem to work with colorbox and I don't why is this:

//comment out these two lines in the grabItem function = e.pageY -;
list.offset.left = e.pageX - list.offset.left;

So give that a go and I might need to dig deeper into what html colorbox generates to see what's going on.