I've got a grid of pictures that I want to be able to drag/drop to sort. sortable() works great. The caveat is that I've also got the jQuery Fancybox plugin http://fancybox.net running which will open up a larger view of an image when clicked.
So you can click to start dragging, but as soon as you drop fancybox is triggered and the image enlarges.
I've tried something like this, but things get REALLY messed up (drag doesn't work at all anymore, my list gets rearranged all over the page, it's nasty):
$('#list').sortable({
start:function(e,ui) {
e.preventDefault();
}
});
Tried with both start
and stop
but no luck. I've also tried unbinding the click
handler for the items, but that didn't help either. Ideally I could sort of "hide" the fancybox handlers while dragging and then reinstate them after I drop. There may be a way to un-fancybox the whole list while dragging and then call $.fancybox()
again to start it up, but there's gotta be an easier way...
Thanks for any help!