Draggable

Other topics

Simple Example

Enable draggable functionality on any DOM element.

<script>
  $(function() {
    $( "#draggable" ).draggable();
  });
</script>
<div id="draggable" class="ui-widget-content">
  <p>Drag me around</p>
</div>

Draggable with handle

You can use any element as an handle to drag another element around:

<script>
  $(function() {
      $( "#draggable" ).draggable({
         handle: ".handle"
      });
  });
</script>
<div id="draggable">
    <span class="handle">Handle</span>
    <div>Content</div>
</div>

Fiddle

Contributors

Topic Id: 522

Example Ids: 1703,4597

This site is not affiliated with any of the contributors.