Effects in Widgets

Effects in Widgets

There's a pretty old ticket (almost a year and a half old) to support effects in dialog ( <a href="http://dev.jqueryui.com/ticket/2358"> http://dev.jqueryui.com/ticket/2358</a> ).  For about a year we've supported specifying the name of an effect, but we don't support specifying any options.  I've create a patch that allows you to specify the name of the effect in the options hash for .show()/.hide()/.toggle().  This makes it very easy to support just an effect name or a full options hash in widgets.  I then ran into a problem where dialog's show option worked with a full option hash, but the hide option didn't.  It turned out to be broken because the dialog plugin specifies its own callback (to trigger the close event) and my patch assumed that you're not passing any other arguments if you specify the effect name in the options hash.  I created a second patch that allows you to specify a callback as a second parameter even when specifying the effect name in the options hash to reduce the complexity of implementing effects in widgets.  Please checkout the patch ( <a href="http://dev.jqueryui.com/attachment/ticket/2358/widget-effects-callback.patch"> http://dev.jqueryui.com/attachment/ticket/2358/widget-effects-callback.patch</a> ) and let me know if you have any objections.