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
Post a Comment