1 | <!doctype html>
|
---|
2 | <html lang="en">
|
---|
3 | <head>
|
---|
4 | <title>jQuery UI Resizable - Delay start</title>
|
---|
5 | <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
---|
6 | <script type="text/javascript" src="../../jquery-1.4.1.js"></script>
|
---|
7 | <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
|
---|
8 | <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
|
---|
9 | <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
|
---|
10 | <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script>
|
---|
11 | <link type="text/css" href="../demos.css" rel="stylesheet" />
|
---|
12 | <style type="text/css">
|
---|
13 | #resizable, #resizable2 { width: 150px; height: 150px; padding: 0.5em; }
|
---|
14 | #resizable h3, #resizable2 h3 { text-align: center; margin: 0; }
|
---|
15 | </style>
|
---|
16 | <script type="text/javascript">
|
---|
17 | $(function() {
|
---|
18 | $("#resizable").resizable({
|
---|
19 | delay: 1000
|
---|
20 | });
|
---|
21 |
|
---|
22 | $("#resizable2").resizable({
|
---|
23 | distance: 40
|
---|
24 | });
|
---|
25 | });
|
---|
26 | </script>
|
---|
27 | </head>
|
---|
28 | <body>
|
---|
29 | <div class="demo">
|
---|
30 |
|
---|
31 | <h3 class="docs">Time delay (ms):</h3>
|
---|
32 | <div id="resizable" class="ui-widget-content">
|
---|
33 | <h3 class="ui-widget-header">Time</h3>
|
---|
34 | </div>
|
---|
35 |
|
---|
36 | <h3 class="docs">Distance delay (px):</h3>
|
---|
37 | <div id="resizable2" class="ui-widget-content">
|
---|
38 | <h3 class="ui-widget-header">Distance</h3>
|
---|
39 | </div>
|
---|
40 |
|
---|
41 | <!-- ADD DISTANCE DEMO -->
|
---|
42 |
|
---|
43 | </div><!-- End demo -->
|
---|
44 |
|
---|
45 | <div class="demo-description">
|
---|
46 |
|
---|
47 | <p>Delay the start of resizng for a number of milliseconds with the <code>delay</code> option; prevent resizing until the cursor is held down and dragged a specifed number of pixels with the <code>distance</code> option.</p>
|
---|
48 |
|
---|
49 | </div><!-- End demo-description -->
|
---|
50 | </body>
|
---|
51 | </html>
|
---|