diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-12-30 08:48:19 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-12-30 08:48:19 +0000 |
commit | fae9c64bd96ba8e87fe413ef450ed9f3a61f454d (patch) | |
tree | 0abc69beae6edbfb3c3531ee2e14a45646a253a0 /demos/draggable/axis.html | |
parent | 84e9175a68b0e342a270c448bdfedb22e5d0ac43 (diff) | |
download | jquery-ui-fae9c64bd96ba8e87fe413ef450ed9f3a61f454d.tar.gz jquery-ui-fae9c64bd96ba8e87fe413ef450ed9f3a61f454d.zip |
demos: first bunch of draggable demos (default, axis, grid, containment)
Diffstat (limited to 'demos/draggable/axis.html')
-rw-r--r-- | demos/draggable/axis.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/demos/draggable/axis.html b/demos/draggable/axis.html new file mode 100644 index 000000000..26154961b --- /dev/null +++ b/demos/draggable/axis.html @@ -0,0 +1,33 @@ +<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Draggable - Constrained to one axis</title>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <link type="text/css" href="../../themes/default/ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.2.6.js"></script>
+ <script type="text/javascript" src="../../ui/ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/ui.draggable.js"></script>
+ <style type="text/css">
+ .ui-widget-content { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 5px; }
+ #draggable { cursor: n-resize; }
+ #draggable2 { cursor: e-resize; }
+ </style>
+ <script type="text/javascript">
+ $(function() {
+ $("#draggable").draggable({ axis: 'y' });
+ $("#draggable2").draggable({ axis: 'x' });
+ });
+ </script>
+</head>
+<body>
+
+<div id="draggable" class="ui-widget-content">
+ <p>I can be dragged only vertically</p>
+</div>
+
+<div id="draggable2" class="ui-widget-content">
+ <p>I can be dragged only horizontally</p>
+</div>
+
+</body>
+</html>
|