使用 jQuery 查找活动表单元素

Find the active form element using jQuery

每次打开弹出模式时我都会创建表单:

<form method="post" data-asset-share-id="download-modal"
    class="ui modal cmp-modal-download--wrapper cmp-modal transition visible active"
    style="top: 151px; display: block !important;">

        "Some html"

</form>

我想知道使用 jQuery 弹出模式是否处于活动状态。

您可以为模态绑定事件处理程序,有custom events in semantic-ui modal。在您的情况下,您可以使用 onVisibleonShow 事件。

$('.modal').on('onVisible', function(){
   // your code here
})