1 | <html> |
---|
2 | <head> |
---|
3 | <title>Resizable Containment Test</title> |
---|
4 | |
---|
5 | <link type="text/css" href="http://jqueryui.com/themes/base/ui.all.css" rel="stylesheet" /> |
---|
6 | <script type="text/javascript" src="http://jqueryui.com/jquery-1.3.2.js"></script> |
---|
7 | <script type="text/javascript" src="http://jqueryui.com/ui/ui.core.js"></script> |
---|
8 | <script type="text/javascript" src="http://jqueryui.com/ui/ui.resizable.js"></script> |
---|
9 | |
---|
10 | </head> |
---|
11 | |
---|
12 | <script type="text/javascript"> |
---|
13 | $(function() { |
---|
14 | $("#resizable").resizable({ |
---|
15 | containment : '#container', |
---|
16 | handles : 'all' |
---|
17 | }); |
---|
18 | }); |
---|
19 | </script> |
---|
20 | <div id="spacer1" style="width:100px;height:100px;background-color:yellow;"></div> |
---|
21 | <div id="spacer2" style="width:100px;height:300px;float:left;background-color:yellow;"></div> |
---|
22 | <div id="container" style="float:left;background-color:blue;width:300px;height:300px;"> |
---|
23 | <div id="resizable" style="background-color:red;position:absolute;top:200px;left:200px;width:100px;height:100px;"> |
---|
24 | </div> |
---|
25 | </div> |
---|
26 | <div id="spacer3" style="clear:both;width:100px;height:100px;background-color:yellow;"></div> |
---|