aboutsummaryrefslogtreecommitdiffstats
path: root/demos/resizable/snap-to-grid.html
diff options
context:
space:
mode:
Diffstat (limited to 'demos/resizable/snap-to-grid.html')
-rw-r--r--demos/resizable/snap-to-grid.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/demos/resizable/snap-to-grid.html b/demos/resizable/snap-to-grid.html
new file mode 100644
index 000000000..4a6a19663
--- /dev/null
+++ b/demos/resizable/snap-to-grid.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Resizable - Snap to grid</title>
+ <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="../../jquery-1.3.js"></script>
+ <script type="text/javascript" src="../../ui/ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/ui.resizable.js"></script>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+ <style type="text/css">
+ #resizable { width: 150px; height: 150px; padding: 0.5em; }
+ #resizable h3 { text-align: center; margin: 0; }
+ </style>
+ <script type="text/javascript">
+ $(function() {
+ $("#resizable").resizable({
+ grid: 50
+ });
+ });
+ </script>
+</head>
+<body>
+<div class="demo">
+
+<div id="resizable" class="ui-widget-content">
+ <h3 class="ui-widget-header">Grid</h3>
+</div>
+
+</div><!-- End demo -->
+
+<div class="demo-description">
+
+<p>Snap the resizable element to a grid. Set the dimensions of grid cells (height and width in pixels) with the <strong>grid</strong> option.</p>
+
+</div><!-- End demo-description -->
+</body>
+</html>