mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
This commit is contained in:
parent
67f393fd7c
commit
63091e2c98
29
ui/tests/draggable.html
Normal file
29
ui/tests/draggable.html
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Language" content="en" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Draggable Test Page</title>
|
||||||
|
<link rel="stylesheet" href="../../qunit/testsuite.css" type="text/css" media="screen">
|
||||||
|
|
||||||
|
<script type="text/javascript" src="../../jquery/jquery-1.2.5.js"></script>
|
||||||
|
<script type="text/javascript" src="../source/ui.core.js"></script>
|
||||||
|
<script type="text/javascript" src="../source/ui.draggable.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="../../qunit/testrunner.js"></script>
|
||||||
|
<script type="text/javascript" src="draggable.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1 id="header">jQuery Test Suite</h1>
|
||||||
|
<h2 id="banner"></h2>
|
||||||
|
<h2 id="userAgent"></h2>
|
||||||
|
|
||||||
|
<div id="main" style="border: 1px solid black; padding: 10px; margin: 10px;">
|
||||||
|
<div id='draggable1' style="background: green; width: 200px; height: 100px;">I'm a draggable.</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ol id="tests"></ol>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
19
ui/tests/draggable.js
Normal file
19
ui/tests/draggable.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
$.fn.triggerKeydown = function(keyCode) {
|
||||||
|
return this.trigger("keydown", [$.event.fix({event:"keydown", keyCode: keyCode, target: this[0]})]);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$("#draggable1").draggable();
|
||||||
|
|
||||||
|
module("draggable: simple drag & drop");
|
||||||
|
|
||||||
|
test("simple drag", function() {
|
||||||
|
|
||||||
|
expect(1);
|
||||||
|
ok(true, "Drag and drop element on the same position");
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user