Draggable fires click event when dragging stops
One hack to overcome this would be to find out on the mouseup event if it were a click or a drag. If it were a drag, don't perform your function.
e.g.
$("#myDraggable").draggable();
$("#myDraggable").bind('dragstop', function(e, ui) {
// blah blah
});
$("#myDraggable").bind("mousedown", function(e){
mouseDownPos = { x:e.pageX, y:e.pageY };
});
$("#myDraggable").bind("mouseup", function(e){
if(mouseDownPos.x == e.pageX &&
mouseDownPos.y == e.pageY) {
// PERFORM YOUR CLICK FUNCTION
}
});
Original Thread at: <a href="http://groups.google.com/group/jquery-ui/browse_thread/thread/b8c3ed9fede296bf?tvc=2&q=drag+click">http://groups.google.com/group/jquery-ui/browse_thread/thread/b8c3ed9fede296bf?tvc=2&q=drag+click</a>