annotate jquery-ui/development-bundle/demos/resizable/snap-to-grid.html @ 0:b2e4605f20b2

beta version
author dwinter
date Thu, 30 Jun 2011 09:07:49 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1 <!DOCTYPE html>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
2 <html lang="en">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
3 <head>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
4 <meta charset="utf-8">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
5 <title>jQuery UI Resizable - Snap to grid</title>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
6 <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
7 <script src="../../jquery-1.5.1.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
8 <script src="../../ui/jquery.ui.core.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
9 <script src="../../ui/jquery.ui.widget.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
10 <script src="../../ui/jquery.ui.mouse.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
11 <script src="../../ui/jquery.ui.resizable.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
12 <link rel="stylesheet" href="../demos.css">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
13 <style>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
14 #resizable { width: 150px; height: 150px; padding: 0.5em; }
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
15 #resizable h3 { text-align: center; margin: 0; }
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
16 </style>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
17 <script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
18 $(function() {
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
19 $( "#resizable" ).resizable({
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
20 grid: 50
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
21 });
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
22 });
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
23 </script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
24 </head>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
25 <body>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
26
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
27 <div class="demo">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
28
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
29 <div id="resizable" class="ui-widget-content">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
30 <h3 class="ui-widget-header">Grid</h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
31 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
32
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
33 </div><!-- End demo -->
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
34
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
35
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
36
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
37 <div class="demo-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
38 <p>Snap the resizable element to a grid. Set the dimensions of grid cells (height and width in pixels) with the <code>grid</code> option.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
39 </div><!-- End demo-description -->
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
40
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
41 </body>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
42 </html>