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/containment.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/containment.html')
-rw-r--r-- | demos/draggable/containment.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/demos/draggable/containment.html b/demos/draggable/containment.html new file mode 100644 index 000000000..09a6a497a --- /dev/null +++ b/demos/draggable/containment.html @@ -0,0 +1,38 @@ +<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Draggable - Grid</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; }
+ </style>
+ <script type="text/javascript">
+ $(function() {
+ $("#draggable").draggable({ containment: 'window' });
+ $("#draggable2").draggable({ containment: 'document' });
+ $("#draggable3").draggable({ containment: 'parent' });
+ });
+ </script>
+</head>
+<body>
+
+<div id="draggable" class="ui-widget-content">
+ <p>I'm contained within the window</p>
+</div>
+
+<div id="draggable2" class="ui-widget-content">
+ <p>I'm contained within the document</p>
+</div>
+
+<div class="ui-widget-content">
+ <p id="draggable3" class='ui-widget-header'>I'm contained within my parent</p>
+</div>
+
+<div style='width: 1px; height: 500px;'></div>
+
+</body>
+</html>
|