tags:

views:

73

answers:

1

Is it possible to specify options for the show and hide options of a Dialog box in jQuery UI.

For example, instead of:

$('#dialog').dialog({
  show: 'fade'
});

Something like:

$('#dialog').dialog({
  show: {effect: 'fade', speed: 1000}
});

(The code above does not, of course, work.)

What I'm really trying to use is the "complete" method inside of the effect, or a callback function, so I can select some text after the effect is done.

If anyone knows, thanks.

A: 

You can use

$("#dialog").dialog({
        autoOpen: false,
        hide: 'fold',
        show: 'blind',
});

and set two different effects for hide and show.

You can't use the "complete" method. At the least not with the actual release. That feature is planned for release 1.9

hope it helps

Lorenzo