Detect if a jQuery UI dialog box is open

前端 未结 5 1957
离开以前
离开以前 2020-12-24 11:10

I am using a jQuery UI dialog. If it is open, I want to do one thing. If it is closed, I want to do another.

My question is, how do I detect if a jQuery UI dialog b

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-24 12:09

    If you read the docs.

    $('#mydialog').dialog('isOpen')
    

    This method returns a Boolean (true or false), not a jQuery object.

提交回复
热议问题