Change cursor for draggable tag : UI Draggable « jQuery « JavaScript DHTML






Change cursor for draggable tag

 

<html lang="en">
<head>
  <title></title>
  <link type="text/css" href="js/themes/base/ui.all.css" rel="stylesheet" />
  <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
  <script type="text/javascript" src="js/ui/ui.core.js"></script>
  <script type="text/javascript" src="js/ui/ui.draggable.js"></script>
  <link type="text/css" href="js/demos.css" rel="stylesheet" />
  <script type="text/javascript">
    $(function() {
        //define config object
        var dragOpts = {
          cursor: "move"
        };

        $("#drag").draggable(dragOpts);
    });
  </script>
</head>
<body>
    <div id="drag">Move me</div>
</body>
</html>

   
  








Related examples in the same category

1.jQuery UI Draggable - Constrain movement
2.jQuery UI Draggable - Cursor style
3.jQuery UI Draggable - Default functionality
4.jQuery UI Draggable - Delay start
5.jQuery UI Draggable - Events
6.jQuery UI Draggable - Handles
7.jQuery UI Draggable - Revert position
8.jQuery UI Draggable - Auto-scroll
9.jQuery UI Draggable - Snap to element or grid
10.jQuery UI Draggable + Sortable
11.jQuery UI Draggable - Visual feedback
12.Set cursor position for the draggable
13.Can only drag along with axis y
14.Drag delay
15.Drag along a grid
16.Add border to the draggable
17.Only draggable inside parent
18.Add dragging stopped event handler
19.revert: true (fly back)
20.Snap to another
21.start and stop events
22.Disable, enable and destroy the draggable object
23.Set the handles for all directions
24.Add knobHandles