title: Prevent click event triggered when dragging
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1771627/preventing-click-event-with-jquery-drag-and-drop">Preventing click event with jQuery drag and drop</a>  </p>
  </blockquote>
  
  
  
  <p>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</p>
  
  <pre><code>    //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();
      })
  </code></pre>