1 <!DOCTYPE html> |
|
2 <html lang="en"> |
|
3 <head> |
|
4 <meta charset="UTF-8" /> |
|
5 <title>jQuery UI Resizable - Synchronous resize</title> |
|
6 <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" /> |
|
7 <script type="text/javascript" src="../../jquery-1.4.2.js"></script> |
|
8 <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script> |
|
9 <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script> |
|
10 <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script> |
|
11 <script type="text/javascript" src="../../ui/jquery.ui.resizable.js"></script> |
|
12 <link type="text/css" href="../demos.css" rel="stylesheet" /> |
|
13 <style type="text/css"> |
|
14 #resizable { background-position: top left; } |
|
15 #resizable, #also { width: 150px; height: 120px; padding: 0.5em; } |
|
16 #resizable h3, #also h3 { text-align: center; margin: 0; } |
|
17 #also { margin-top: 1em; } |
|
18 </style> |
|
19 <script type="text/javascript"> |
|
20 $(function() { |
|
21 $("#resizable").resizable({ |
|
22 alsoResize: '#also' |
|
23 }); |
|
24 $("#also").resizable(); |
|
25 }); |
|
26 </script> |
|
27 </head> |
|
28 <body> |
|
29 <div class="demo"> |
|
30 |
|
31 <div id="resizable" class="ui-widget-header"> |
|
32 <h3 class="ui-state-active">Resize</h3> |
|
33 </div> |
|
34 |
|
35 <div id="also" class="ui-widget-content"> |
|
36 <h3 class="ui-widget-header">will also resize</h3> |
|
37 </div> |
|
38 |
|
39 </div><!-- End demo --> |
|
40 |
|
41 <div class="demo-description"> |
|
42 |
|
43 <p>Resize multiple elements simultaneously by clicking and dragging the sides of one. Pass a shared selector into the <code>alsoResize</code> option.</p> |
|
44 |
|
45 </div><!-- End demo-description --> |
|
46 </body> |
|
47 </html> |
|