Ryan Weiss Ryan Weiss - 3 months ago 15
Javascript Question

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") {
$(this).attr("controls", true);
} else if(event.type === "mouseleave") {
$(this).attr("controls", false);
$(this).prop("controls", false);

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! Any ideas why? Grumble.

document.getElementById("myVideo").controls = false;