File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,10 @@ typecode-js v 0.1
158
158
}
159
159
return this ;
160
160
} ;
161
+
162
+ this . getOverlay = function ( ) {
163
+ return $e ;
164
+ } ;
161
165
162
166
this . setHeader = function ( $hd ) {
163
167
$elements . hd . empty ( ) . append ( $hd ) ;
@@ -204,8 +208,13 @@ typecode-js v 0.1
204
208
205
209
$e . find ( '.btn-close' ) . bind ( "click" , { instance :this } , events . clickClose ) ;
206
210
207
- $m . fadeIn ( ) ;
208
- $e . fadeIn ( ) . scrollTop ( 0 ) . focus ( ) ;
211
+
212
+ if ( o . openTransition && $ . isFunction ( o . openTransition ) ) {
213
+ o . openTransition ( $e , $m ) ;
214
+ } else {
215
+ $m . fadeIn ( ) ;
216
+ $e . fadeIn ( ) . scrollTop ( 0 ) . focus ( ) ;
217
+ }
209
218
210
219
if ( o . isTouchDevice ) {
211
220
$m . height ( $ ( document ) . height ( ) ) ;
@@ -222,8 +231,13 @@ typecode-js v 0.1
222
231
223
232
this . close = function ( ) {
224
233
if ( ! open ) { return this ; }
225
- $m . fadeOut ( ) ;
226
- $e . hide ( ) . blur ( ) ;
234
+
235
+ if ( o . closeTransition && $ . isFunction ( o . closeTransition ) ) {
236
+ o . closeTransition ( $e , $m ) ;
237
+ } else {
238
+ $m . fadeOut ( ) ;
239
+ $e . hide ( ) . blur ( ) ;
240
+ }
227
241
228
242
$ ( window . document ) . unbind ( "keydown.overlay" , events . keydown ) ;
229
243
You can’t perform that action at this time.
0 commit comments