File tree Expand file tree Collapse file tree 2 files changed +12
-15
lines changed Expand file tree Collapse file tree 2 files changed +12
-15
lines changed Original file line number Diff line number Diff line change 18
18
< script src ="../../ui/jquery.ui.effect-explode.js "> </ script >
19
19
< link rel ="stylesheet " href ="../demos.css ">
20
20
< script >
21
- // increase the default animation speed to exaggerate the effect
22
- $ . fx . speeds . _default = 1000 ;
23
21
$ ( function ( ) {
24
22
$ ( "#dialog" ) . dialog ( {
25
23
autoOpen : false ,
26
- show : "blind" ,
27
- hide : "explode"
24
+ show : {
25
+ effect : "blind" ,
26
+ duration : 1000
27
+ } ,
28
+ hide : {
29
+ effect : "explode" ,
30
+ duration : 1000
31
+ }
28
32
} ) ;
29
33
30
34
$ ( "#opener" ) . click ( function ( ) {
31
35
$ ( "#dialog" ) . dialog ( "open" ) ;
32
- return false ;
33
36
} ) ;
34
37
} ) ;
35
38
</ script >
Original file line number Diff line number Diff line change @@ -255,14 +255,9 @@ $.widget("ui.dialog", {
255
255
$ ( this . document [ 0 ] . activeElement ) . blur ( ) ;
256
256
}
257
257
258
- if ( this . options . hide ) {
259
- this . _hide ( this . uiDialog , this . options . hide , function ( ) {
260
- that . _trigger ( "close" , event ) ;
261
- } ) ;
262
- } else {
263
- this . uiDialog . hide ( ) ;
264
- this . _trigger ( "close" , event ) ;
265
- }
258
+ this . _hide ( this . uiDialog , this . options . hide , function ( ) {
259
+ that . _trigger ( "close" , event ) ;
260
+ } ) ;
266
261
} ,
267
262
268
263
isOpen : function ( ) {
@@ -289,10 +284,9 @@ $.widget("ui.dialog", {
289
284
290
285
this . _size ( ) ;
291
286
this . _position ( options . position ) ;
292
- uiDialog . show ( options . show ) ;
293
287
this . overlay = options . modal ? new $ . ui . dialog . overlay ( this ) : null ;
294
-
295
288
this . moveToTop ( null , true ) ;
289
+ this . _show ( uiDialog , options . show ) ;
296
290
297
291
// set focus to the first tabbable element in the content area or the first button
298
292
// if there are no tabbable elements, set focus on the dialog itself
You can’t perform that action at this time.
0 commit comments