File tree Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change 13
13
< script type ="text/javascript " src ="http://jqueryui.com/themeroller/themeswitchertool/ "> </ script >
14
14
< script type ="text/javascript ">
15
15
$ ( function ( ) {
16
- var ul = $ ( "ul" ) ;
17
- $ ( "input" ) . each ( function ( ) {
18
- $ ( this ) . position ( {
19
- my : this . id . replace ( / - / , " " ) ,
20
- at : this . id . replace ( / - / , " " ) ,
21
- of : "#container" ,
22
- collision : "none"
16
+ var inputs = $ ( "input" ) ;
17
+ $ ( "ul" ) . insertAfter ( inputs ) ;
18
+ $ ( window ) . resize ( function ( ) {
19
+ inputs . each ( function ( ) {
20
+ $ ( this ) . position ( {
21
+ my : this . id . replace ( / - / , " " ) ,
22
+ at : this . id . replace ( / - / , " " ) ,
23
+ of : "#container" ,
24
+ collision : "none"
25
+ } ) ;
26
+ $ ( this ) . next ( ) . menu ( ) . position ( {
27
+ my : "left top" ,
28
+ at : "left bottom" ,
29
+ of : this
30
+ } ) ;
23
31
} ) ;
24
- ul . clone ( ) . insertAfter ( this ) . menu ( ) . position ( {
25
- my : "left top" ,
26
- at : "left bottom" ,
27
- of : this
28
- } ) ;
29
- } ) ;
30
- ul . remove ( ) ;
32
+ } ) . resize ( ) ;
31
33
} ) ;
32
34
</ script >
33
35
< style >
34
36
input , .ui-menu { position : absolute; }
35
37
.ui-menu { width : 200px ; }
36
- html , body { width : 100 % ; height : 100 % }
38
+ html , body { width : 99 % ; height : 99 % }
37
39
# container { width : 95% ; height : 95% ; border : 1px solid black; margin : auto; }
38
40
</ style >
39
41
</ head >
You can’t perform that action at this time.
0 commit comments