1 | <!doctype html> |
---|
2 | <html lang="en"> |
---|
3 | <head> |
---|
4 | <title>jQuery UI Resizable - Visual feedback</title> |
---|
5 | <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" /> |
---|
6 | <script type="text/javascript" src="../../jquery-1.3.2.js"></script> |
---|
7 | <script type="text/javascript" src="../../ui/ui.core.js"></script> |
---|
8 | <script type="text/javascript" src="../../ui/ui.resizable.js"></script> |
---|
9 | <script type="text/javascript" src="../../ui/ui.draggable.js"></script> |
---|
10 | <link type="text/css" href="../demos.css" rel="stylesheet" /> |
---|
11 | <style type="text/css"> |
---|
12 | #resizable { width: 150px; height: 150px; padding: 0.5em; position:absolute; } |
---|
13 | #resizable h3 { text-align: center; margin: 0; } |
---|
14 | .ui-resizable-ghost { border: 1px dotted gray; } |
---|
15 | </style> |
---|
16 | <script type="text/javascript"> |
---|
17 | $(function() { |
---|
18 | $("#resizable").resizable({ ghost: true }).draggable({ handle:'h3' }); |
---|
19 | }); |
---|
20 | function setToZero() |
---|
21 | { |
---|
22 | } |
---|
23 | </script> |
---|
24 | </head> |
---|
25 | <body> |
---|
26 | <div class="demo"> |
---|
27 | <br/><br/><br/><br/>Originally, the div is below this text. <a href="#" onclick="$('#resizable').css('top',0)">Set div position to top:0</a> Now manually resize the div. The box "jumps" to its original position. |
---|
28 | |
---|
29 | <div id="resizable" class="ui-widget-content"> |
---|
30 | <h3 class="ui-widget-header">Ghost</h3> |
---|
31 | </div> |
---|
32 | |
---|
33 | </div><!-- End demo --> |
---|
34 | |
---|
35 | <div class="demo-description"> |
---|
36 | |
---|
37 | </div><!-- End demo-description --> |
---|
38 | </body> |
---|
39 | </html> |
---|