mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
draggable unit tests: Added a few tests
This commit is contained in:
parent
191ec35cf1
commit
b3702cf1a1
@ -0,0 +1,24 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Draggable Visual Test : Draggable option containment array</title>
|
||||
<link rel="stylesheet" href="../visual.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../../themes/base/ui.all.css" type="text/css">
|
||||
<script type="text/javascript" src="../../../jquery-1.3.1.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/ui.core.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/ui.draggable.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#draggable").css({ width: 100, height: 100, background: '#abc' });
|
||||
$("#draggable").draggable({
|
||||
containment: [50, 100, 400, 350]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="draggable">
|
||||
<p> Draggable </p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,30 +1,24 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Simple Draggable with Handle</title>
|
||||
<link rel="stylesheet" href="../all.css" type="text/css">
|
||||
<title>Draggable Visual Test : Draggable option cursorAt array</title>
|
||||
<link rel="stylesheet" href="../visual.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../../themes/base/ui.all.css" type="text/css">
|
||||
<script type="text/javascript" src="../../../jquery-1.3.1.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/ui.core.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/ui.draggable.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#draggable").css({ width: 100, height: 100, background: '#abc' });
|
||||
$("#draggable").draggable({
|
||||
handle: "span"
|
||||
cursorAt: [5, -5]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<ul class="plugins">
|
||||
<li class="plugin">
|
||||
Draggable
|
||||
<div id="draggable">
|
||||
<span>Handle</span>
|
||||
<p> Draggable </p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
24
tests/visual/draggable/draggable_option_cursorAt_object.html
Normal file
24
tests/visual/draggable/draggable_option_cursorAt_object.html
Normal file
@ -0,0 +1,24 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Draggable Visual Test : Draggable option cursorAt object</title>
|
||||
<link rel="stylesheet" href="../visual.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../../themes/base/ui.all.css" type="text/css">
|
||||
<script type="text/javascript" src="../../../jquery-1.3.1.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/ui.core.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/ui.draggable.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#draggable").css({ width: 100, height: 100, background: '#abc' });
|
||||
$("#draggable").draggable({
|
||||
cursorAt: { top: -15, right: 15 }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="draggable">
|
||||
<p> Draggable </p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
26
tests/visual/draggable/draggable_option_handle_selector.html
Normal file
26
tests/visual/draggable/draggable_option_handle_selector.html
Normal file
@ -0,0 +1,26 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Draggable Visual Test : Draggable option handle selector</title>
|
||||
<link rel="stylesheet" href="../visual.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../../themes/base/ui.all.css" type="text/css">
|
||||
<script type="text/javascript" src="../../../jquery-1.3.1.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/ui.core.js"></script>
|
||||
<script type="text/javascript" src="../../../ui/ui.draggable.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#draggable").css({ width: 100, height: 100, background: '#abc' });
|
||||
$("#draggable").draggable({
|
||||
handle: ".handle"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="draggable">
|
||||
<p> Draggable </p>
|
||||
<p class="handle">Handle</p>
|
||||
<p>Not handle</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user