jQuery Dialog, closing when click outside -


I know that I can use the following to close the dialog box by clicking outside:

  $ ('.ui-widget-overlay'). Click (function () {$ ("# dialog"). Dialog ("off");});  

But how do I change it, it works for every dialog box, that is, I want to close any dialog box because we have more than one on the page and one line

You can assign a square to each dialog

And then select it and run it on each and also it is trust, even if it is not open, it will work:

  $ ('.ui-widget-overlay'). Click (function () {$ ("dialog") .each (function () {$ (this) .dialog ("off");})});  

Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -