File tree Expand file tree Collapse file tree 1 file changed +12
-26
lines changed Expand file tree Collapse file tree 1 file changed +12
-26
lines changed Original file line number Diff line number Diff line change 1
- <!DOCTYPE html>
1
+ <!doctype html>
2
2
< html lang ="en ">
3
3
< head >
4
4
< meta charset ="utf-8 ">
9
9
< script src ="../../ui/jquery.ui.widget.js "> </ script >
10
10
< script src ="../../ui/jquery.ui.position.js "> </ script >
11
11
< link rel ="stylesheet " href ="../demos.css ">
12
- < style >
13
- html , body {
14
- margin : 0 ;
15
- padding : 0
16
- }
17
- </ style >
18
12
< script >
19
13
$ ( function ( ) {
20
14
// TODO refactor into a widget and get rid of these plugin methods
21
- $ . fn . position2 = function ( options ) {
22
- return this . position ( $ . extend ( {
23
- of : window ,
24
- using : function ( to ) {
25
- $ ( this ) . css ( {
26
- top : to . top ,
27
- left : to . left
28
- } )
29
- } ,
30
- collision : "none"
31
- } , options ) ) ;
32
- }
33
-
34
15
$ . fn . left = function ( using ) {
35
- return this . position2 ( {
16
+ return this . position ( {
36
17
my : "right middle" ,
37
18
at : "left+25 middle" ,
19
+ of : window ,
20
+ collision : "none" ,
38
21
using : using
39
22
} ) ;
40
- }
23
+ } ;
41
24
$ . fn . right = function ( using ) {
42
- return this . position2 ( {
25
+ return this . position ( {
43
26
my : "left middle" ,
44
27
at : "right-25 middle" ,
28
+ of : window ,
29
+ collision : "none" ,
45
30
using : using
46
31
} ) ;
47
- }
32
+ } ;
48
33
$ . fn . center = function ( using ) {
49
- return this . position2 ( {
34
+ return this . position ( {
50
35
my : "center middle" ,
51
36
at : "center middle" ,
37
+ of : window ,
52
38
using : using
53
39
} ) ;
54
40
} ;
68
54
$ ( "img:eq(2)" ) . right ( ) ;
69
55
70
56
function animate ( to ) {
71
- $ ( this ) . stop ( true , false ) . animate ( to ) ;
57
+ $ ( this ) . stop ( true , false ) . animate ( to ) ;
72
58
}
73
59
function next ( event ) {
74
60
event . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments