jQuery UI dialogs: how to close dialog when click outside?

后端 未结 5 1017
夕颜
夕颜 2020-12-15 13:24

In docs I didn\'t see such information.

There are options to close dialog in such cases:

1) push Esc;

2) click on \"OK\" or \"Close\" buttons in the

5条回答
  •  死守一世寂寞
    2020-12-15 14:08

    Facing the same problem, I have created a small plugin that enables to close a dialog when clicking outside of it whether it a modal or non-modal dialog. It supports one or multiple dialogs on the same page.

    More information on my website here: http://www.coheractio.com/blog/closing-jquery-ui-dialog-widget-when-clicking-outside

    The plugin is also on github: https://github.com/coheractio/jQuery-UI-Dialog-ClickOutside

    Laurent

提交回复
热议问题