File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 < title > absolute</ title >
77 < style type ="text/css " media ="screen ">
88 body { margin : 1px ; padding : 5px ; }
9- div .absolute { position : absolute; margin : 1px ; border : 2px solid # 000 ; padding : 5px ; width : 100px ; height : 100px ; }
9+ div .absolute { position : absolute; margin : 1px ; border : 2px solid # 000 ; padding : 5px ; width : 100px ; height : 100px ; background : # fff ; }
1010 # absolute-1 { top : 0 ; left : 0 ; }
1111 # absolute-1-1 { top : 1px ; left : 1px ; }
1212 # absolute-1-1-1 { top : 1px ; left : 1px ; }
1313 # absolute-2 { top : 19px ; left : 19px ; }
14+ # marker { position : absolute; border : 2px solid # 000 ; width : 50px ; height : 50px ; background : # ccc ; }
1415 </ style >
1516 < script type ="text/javascript " src ="../../../dist/jquery.js "> </ script >
16- < script type ="text/javascript " charset ="utf-8 "> $ ( function ( ) { return ; } ) ; </ script >
17+ < script type ="text/javascript " charset ="utf-8 ">
18+ $ ( function ( ) {
19+ $ ( '.absolute' ) . click ( function ( ) {
20+ $ ( '#marker' ) . css ( $ ( this ) . offset ( ) ) ;
21+ return false ;
22+ } ) ;
23+ } ) ;
24+ </ script >
1725 </ head >
1826 < body >
1927 < div id ="absolute-1 " class ="absolute "> absolute-1
2230 </ div >
2331 </ div >
2432 < div id ="absolute-2 " class ="absolute "> absolute-2</ div >
33+ < div id ="marker "> </ div >
2534 </ body >
2635</ html >
You can’t perform that action at this time.
0 commit comments