File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 7575 itop = p . top ;
7676 ileft = p . left ;
7777 }
78+
79+ // put overlay into final position
80+ if ( conf . fixed ) {
81+ itop -= w . scrollTop ( ) ;
82+ ileft -= w . scrollLeft ( ) ;
83+ } else {
84+ pos . top += w . scrollTop ( ) ;
85+ pos . left += w . scrollLeft ( ) ;
86+ }
7887
7988 // initialize background image and make it visible
8089 img . css ( {
81- position : position ,
90+ position : 'absolute' ,
8291 top : itop ,
8392 left : ileft ,
8493 width : 0 ,
8594 zIndex : conf . zIndex
8695 } ) . show ( ) ;
87-
8896
89- // put overlay into final position
90- pos . top += w . scrollTop ( ) ;
91- pos . left += w . scrollLeft ( ) ;
9297 pos . position = position ;
9398 overlay . css ( pos ) ;
9499
95100 // begin growing
96- img . animate ( {
101+ img . animate ( {
97102 top : overlay . css ( "top" ) ,
98103 left : overlay . css ( "left" ) ,
99104 width : oWidth } , conf . speed , function ( ) {
107112 overlay . hide ( ) ;
108113 }
109114 } ) ;
110- } ) ;
115+
116+ } ) . css ( "position" , position ) ;
111117
112118 } ;
113119//}}}
Original file line number Diff line number Diff line change 5454 mask : '#561' ,
5555 oneInstance : false ,
5656 lazyload : true ,
57- fixed : true ,
57+ fixed : false ,
5858
5959 onLoad : function ( ) {
6060 console . info ( "apple done" ) ;
6868} ) ;
6969</ script >
7070
71+ < div style ="height:400px "> </ div >
7172< p >
7273 < a class ="o1 " rel ="#overlay " href ="# "> show</ a >
7374 < a class ="o1 " rel ="#overlay " href ="# "> show b</ a >
You can’t perform that action at this time.
0 commit comments