[英]HTML5 Video: Hiding controls does not work in internet explorer, removeAttr, removeProp, etc
Trying to hide and show the video controls on hover enter / hover leave: 尝试在悬停时隐藏和显示视频控件进入/悬停离开:
$('#content-video').hover(function(event) {
if(event.type === "mouseenter") {
console.log("ENTER");
$(this).attr("controls", true);
} else if(event.type === "mouseleave") {
console.log("EXIT");
$(this).attr("controls", false);
$(this).prop("controls", false);
$(this).removeAttr("controls");
$(this).removeProp("controls");
currentVideo.removeAttribute('controls');
}
})
Have tried everything. 尝试了一切。 The ENTER and EXIT messages show properly, as expected, in Internet explorer, but the 'controls="true"' stays on the element and the controls stay visible on mouseleave!
正如预期的那样,ENTER和EXIT消息在Internet Explorer中正确显示,但'controls =“true”'停留在元素上,并且控件在mouseleave上保持可见! Any ideas why?
有什么想法吗? Grumble.
叽。
document.getElementById("myVideo").controls = false;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.