jQuery UI Dialog关闭事件

jQuery UI Dialog关闭事件

jQuery UI Close事件是在对话框关闭时触发的。

在这里了解更多关于jQuery选择器和事件的信息。

语法:

$(".selector").dialog (
   close: function( event, ui ) {
       console.log('closed')
   },

步骤:

  • 首先,添加你的项目所需的jQuery Mobile脚本。
<link href = 
"https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css"
    rel = "stylesheet">
<script src = "https://code.jquery.com/jquery-1.10.2.js"></script>
<script src = "https://code.jquery.com/ui/1.10.4/jquery-ui.js">
</script>
  • 打开对话框 “按钮将触发点击功能(#gfg),该功能将<textarea>在一个对话框中进一步打开