Skip to content
Permalink
Browse files

demos: added demo wrappers, fixed some issues with non explicit css r…

…ules
  • Loading branch information
Paul Bakaus
Paul Bakaus committed Dec 31, 2008
1 parent 5423b6d commit e9a162a23c5aed036361b3843fc8f321912494de
@@ -20,7 +20,8 @@
</script>
</head>
<body>

<div class="demo">

<div id="draggable" class="ui-widget-content">
<p>I can be dragged only vertically</p>
</div>
@@ -29,5 +30,14 @@
<p>I can be dragged only horizontally</p>
</div>

</div><!-- End demo -->

<div class="demo-description">

<p>
<!-- Add description here -->
</p>

</div><!-- End demo-description -->
</body>
</html>
@@ -19,7 +19,8 @@
</script>
</head>
<body>

<div class="demo">

<div id="draggable" class="ui-widget-content">
<p>I'm contained within the window</p>
</div>
@@ -32,6 +33,15 @@
<p id="draggable3" class='ui-widget-header'>I'm contained within my parent</p>
</div>

</div><!-- End demo -->

<div class="demo-description">

<p>
<!-- Add description here -->
</p>

</div><!-- End demo-description -->
<div style='width: 1px; height: 500px;'></div>

</body>
@@ -19,7 +19,8 @@
</script>
</head>
<body>

<div class="demo">

<div id="draggable" class="ui-widget-content">
<p>I will always stick to the center (relative to the mouse)</p>
</div>
@@ -32,5 +33,14 @@
<p>My cursor position is only controlled for the 'bottom' value</p>
</div>

</div><!-- End demo -->

<div class="demo-description">

<p>
<!-- Add description here -->
</p>

</div><!-- End demo-description -->
</body>
</html>
@@ -18,9 +18,21 @@
</head>
<body>

<div class="demo">

<div id="draggable" class="ui-widget-content">
<p>Drag me around</p>
</div>

</div><!-- End demo -->

<div class="demo-description">

<p>
The easiest way to make an element draggable. Hold down the mouse and drag it around.
</p>

</div><!-- End demo-description -->

</body>
</html>
@@ -18,7 +18,8 @@
</script>
</head>
<body>

<div class="demo">

<div id="draggable" class="ui-widget-content">
<p>Only if you drag me by 20 pixels, the dragging will start</p>
</div>
@@ -27,5 +28,14 @@
<p>Regardless of the distance, you have to drag and wait for 1000ms before dragging starts</p>
</div>

</div><!-- End demo -->

<div class="demo-description">

<p>
<!-- Add description here -->
</p>

</div><!-- End demo-description -->
</body>
</html>
@@ -18,7 +18,8 @@
</script>
</head>
<body>

<div class="demo">

<div id="draggable" class="ui-widget-content">
<p>I can be dragged in a 20x20 grid system</p>
</div>
@@ -27,5 +28,14 @@
<p>I only follow a vertical 50 pixel grid</p>
</div>

</div><!-- End demo -->

<div class="demo-description">

<p>
<!-- Add description here -->
</p>

</div><!-- End demo-description -->
</body>
</html>
@@ -18,10 +18,20 @@
</script>
</head>
<body>

<div class="demo">

<div id="draggable" class="ui-widget-content">
<p class="ui-widget-header">I can be dragged only by this handle</p>
</div>

</div><!-- End demo -->

<div class="demo-description">

<p>
<!-- Add description here -->
</p>

</div><!-- End demo-description -->
</body>
</html>
@@ -25,6 +25,7 @@
</script>
</head>
<body>
<div class="demo">

<div id="draggable" class="ui-widget-content">
<p>Original</p>
@@ -38,5 +39,14 @@
<p>Custom helper (in combination with cursorAt)</p>
</div>

</div><!-- End demo -->

<div class="demo-description">

<p>
<!-- Add description here -->
</p>

</div><!-- End demo-description -->
</body>
</html>
@@ -18,7 +18,8 @@
</script>
</head>
<body>

<div class="demo">

<div id="draggable1" class="ui-widget-content">
<p>Opacity set to 0.5</p>
</div>
@@ -27,5 +28,14 @@
<p>Opacity set to 0.5, using 'clone' as helper</p>
</div>

</div><!-- End demo -->

<div class="demo-description">

<p>
<!-- Add description here -->
</p>

</div><!-- End demo-description -->
</body>
</html>
@@ -18,7 +18,8 @@
</script>
</head>
<body>

<div class="demo">

<div id="draggable" class="ui-widget-content">
<p>Revert the original</p>
</div>
@@ -27,5 +28,14 @@
<p>Revert the helper</p>
</div>

</div><!-- End demo -->

<div class="demo-description">

<p>
<!-- Add description here -->
</p>

</div><!-- End demo-description -->
</body>
</html>
@@ -19,7 +19,8 @@
</script>
</head>
<body>

<div class="demo">

<div id="draggable" class="ui-widget-content">
<p>Scroll set to true, default settings</p>
</div>
@@ -34,5 +35,14 @@

<div style='height: 5000px; width: 1px;'></div>

</div><!-- End demo -->

<div class="demo-description">

<p>
<!-- Add description here -->
</p>

</div><!-- End demo-description -->
</body>
</html>
@@ -22,7 +22,8 @@
</script>
</head>
<body>

<div class="demo">

<div id="snaptarget" class="ui-widget-header">
<p>I'm a snap target</p>
</div>
@@ -50,6 +51,15 @@
</div>


</div><!-- End demo -->

<div class="demo-description">

<p>
<!-- Add description here -->
</p>

</div><!-- End demo-description -->



@@ -9,21 +9,22 @@
<script type="text/javascript" src="../../ui/ui.sortable.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<style type="text/css">
ul { list-style-type: none; margin: 0; padding: 0; margin-bottom: 10px; }
li { margin: 3px; padding: 2px; width: 150px; }
#sortable { list-style-type: none; margin: 0; padding: 0; margin-bottom: 10px; }
#sortable li { margin: 3px; padding: 2px; width: 150px; }
</style>
<script type="text/javascript">
$(function() {
$("#sortable").sortable();
$("#draggable").draggable({
connectToSortable: ['ul'],
connectToSortable: ['#sortable'],
helper: 'clone'
});
});
</script>
</head>
<body>

<div class="demo">

<ul>
<li id="draggable" class="ui-state-highlight">Drag me down</li>
</ul>
@@ -36,5 +37,14 @@
<li class="ui-state-default">Item 5</li>
</ul>

</div><!-- End demo -->

<div class="demo-description">

<p>
<!-- Add description here -->
</p>

</div><!-- End demo-description -->
</body>
</html>
@@ -19,7 +19,8 @@
</script>
</head>
<body>

<div class="demo">

<div id="draggable" class="ui-widget-content">
<p>I always have a higher z-index than my siblings during drag</p>
</div>
@@ -38,5 +39,14 @@
</div>
</div>

</div><!-- End demo -->

<div class="demo-description">

<p>
<!-- Add description here -->
</p>

</div><!-- End demo-description -->
</body>
</html>

0 comments on commit e9a162a

Please sign in to comment.
You can’t perform that action at this time.