Possible Duplicate:
Preventing click event with jQuery drag and drop
Assuming there is a slider of photo gallery. User can drag on the photo slider and select the photo to view when click on the photo. The problem is the click event is overlap with drag event. That means, when user click on the photo to drag, it will occur the click event as well. Thanks
//slider is draggable
$('#slider').draggable({axis: "x"});
//slider photo click event
$('#slider li').click(function() {
page_index = $(this).attr('class').substring(4);
tmp = parseInt(page_index);
$('#book').turn('page', tmp);
close_overlay();
})