jquery ui - making dialogs more "dynamic" ?

Posted by mike on Stack Overflow See other posts from Stack Overflow or by mike
Published on 2010-06-17T17:06:58Z Indexed on 2010/06/17 17:13 UTC
Read the original article Hit count: 116

Filed under:
|

Hello,

I have a page that uses multiple dialogs for different things. Some dialogs may have buttons that others do not while other may need to be a different height than another... All of them have a set of params that will not change. My question, can I have a default like:

$('.someElement').dialog({
   width: 999,
   show: 'slide',
   hide: 'slide',
   ETC: 'some other option' 
}); 

and use it for all of my dialogs, then pass buttons or height to it dynamically when I open a dialog? It just seems wrong to have something like the above for every dialog I need...

Thanks!

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery