Draggable with scroll bar : Drag Drop « Scriptaculous « JavaScript DHTML






Draggable with scroll bar

 
<html>
<head>
<title>Untitled Document</title>

<script src="scriptaculous-js-1.8.2/lib/prototype.js" type="text/javascript"></script>
<script src="scriptaculous-js-1.8.2/src/scriptaculous.js" type="text/javascript"></script>
<script src="scriptaculous-js-1.8.2/src/unittest.js" type="text/javascript"></script>

<script type="text/javascript">
Event.observe(window, 'load', function() {
  new Draggable('my', { scroll: 'container' });
});



</script>

</head>
<body>

<div id="container">
  <p>A</p>
  <p id="my">Drag this around!</p>
  <p>C</p>
</div>
</body>
</html>

   
  








Related examples in the same category

1.Drag and drop: invert
2.Drag and drop to reorder
3.Drag and drop: ghosting effect
4.Drag and drop: hover class
5.Drag and drop: snap
6.Drag and drop: force to scroll
7.Drag and drop between two tables
8.Droppable target
9.Add delay to drag and drop
10.Draggable handle
11.Ghosting vs. non-ghosting