[英]Detect if the mouse is not over an element in an iframe
I want to be able to detect if the mouse is over a certain div. 我希望能够检测鼠标是否在某个div上。 So I do this
所以我这样做
if ($('#mydv').is(':hover')) {
//doSometing
});
how do I detect if the mouse in not over the div? 如何检测鼠标是否不在div上? Also I read that this might not work if the element is an iframe.
我也读到,如果元素是iframe,这可能不起作用。 Is there a way to make this work in an iframe as well?
有没有办法在iframe中也能完成这项工作?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.