我有这样的代码:
<div
id="cover"
style="position: absolute; max-width:70px; max-height:20px; cursor: pointer;"
onClick="$('.cove-ke').css('display','block !none');">
<div
id="cover-id"
class="cover-ke"
style="opacity: 0; z-index: 999999; cursor: pointer;"
onClick="$('.cover-ke').css('display','none !important'">
</div>
</div>
和脚本:
var finished_rendering = function() {
$(window).mousemove(function (pos) {
$("#cover").css('left',(pos.pageX-40)+'px').css('top',(pos.pageY-5)+'px');
});
$('#cover-id > span > iframe').iframeTracker({
blurCallback: function(){
$(window).unbind('mousemove');
$('.cover-ke').css('display','none');
}
});
}
当你用鼠标点击div时 - elemets正在隐藏,但它不适用于iphone safari。你怎么看待这个?怎么解决?
答案 0 :(得分:0)
我在其他主题中找到了一个crossbrowser解决方案:
var monitor = setInterval(function(){
var elem = document.activeElement;
if(elem && elem.tagName == 'IFRAME'){
message.innerHTML = 'Clicked';
clearInterval(monitor);
}
}, 100);