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

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -