[英]Do something with jquery after clicking a link to close a modal
I have a modal with the following code to close it 我有一个模态与以下代码将其关闭
a#modalclick.icon.icon-close.pull-left href="#mymodal"
I want to know when the x icon is clicked and the modal closed so I can do something with the link id. 我想知道何时单击x图标并关闭模态,以便可以使用链接ID进行操作。
My javascript is; 我的JavaScript是;
$('#modalclick').on('click', function(event) {
console.log('clicked')
});
but it's not recognising the modal being clicked closed... 但它无法识别正在关闭的模式...
Have you tried using .not(':visible') ? 您是否尝试使用.not(':visible')?
if ( $('#yourdiv').not(':visible') ) {
console.log('not visible');
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.