jquery-ui/ui/tests/autodrag.html

68 lines
1.3 KiB
HTML
Raw Normal View History

2008-05-24 14:09:23 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<title>Draggable - Automated Test Page</title>
2008-05-24 22:30:03 +00:00
<script type="text/javascript" src="../../jquery/jquery-1.2.6.js"></script>
2008-05-24 14:09:23 +00:00
<script type="text/javascript" src="../../ui/source/ui.core.js"></script>
<script type="text/javascript" src="../../ui/source/ui.draggable.js"></script>
<script type="text/javascript" src="ui.testmouse.js"></script>
2008-05-24 14:09:23 +00:00
<style type="text/css">
html, body { height: 100%; }
2008-05-24 14:09:23 +00:00
#main { height: 100%; }
.drag { position: relative; margin: 10px; padding: 10px; border: 3px solid black; cursor: move; width: 200px; height: 40px; background: #eef; }
2008-05-24 14:09:23 +00:00
</style>
<script type="text/javascript">
</script>
<script type="text/javascript">
$(function() {
$(".drag").draggable().testMouse({
speed: "fast"
});
2008-05-24 14:09:23 +00:00
$('#begin').click(function(e) {
$("#status").text("Running...");
$(".drag:eq(0)").testMouse("drag", 100, 0, function() {
$('#status').text("Ready");
});
2008-05-24 14:09:23 +00:00
});
});
</script>
</head>
<body>
<div id="main">
<h1>jQuery UI Draggable - Automated Test</h1>
Status: <span id="status">Ready</span>
2008-05-24 14:09:23 +00:00
<div style="height: 3em;"><button id="begin">Run Test</button></div>
<div class="drag">
Drag 1
</div>
<div class="drag">
Drag 2
</div>
<div class="drag">
Drag 3
2008-05-24 14:09:23 +00:00
</div>
</div>
</body>
</html>