deb
deb

Reputation: 12814

How to use easing with Jquery dialog widget

I'm using the jquery dialog widget in the jquery UI to show a form in a modal dialog. I would like to customize the animation, but I don't see anything in the options other than specifying the effect by name. For example:

$( ".selector" ).dialog({ show: 'slide' });

I also noticed that the timing of the effect and the darkening of the screen (modal set to true) don't quite match when opening the dialogue. The dialog remains under the dark overlay until the effect is over.

Is there a way to customize the effect in the dialog options? Maybe use the easing plugin with it?

Thank you

Upvotes: 1

Views: 1477

Answers (1)

Nicola Peluchetti
Nicola Peluchetti

Reputation: 76880

I think you can also specify other parameters providing an hash:

$("#dialog").dialog({
  show: {effect: "fadeIn", duration: 5000}
});

fiddle here http://jsfiddle.net/dHs73/

Upvotes: 3

Related Questions