1
ホバー/ホバー休暇を入力してください上のビデオコントロールを非表示と表示するようにしようとは:HTML5ビデオ:コントロールを非表示にすると、Internet Explorerで動作しません、removeAttr、removePropなど
$('#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');
}
})
は、すべてのものを試してみました。 EnterとEXITメッセージはInternet Explorerでは正常に表示されますが、 'controls = "true"'は要素に残り、コントロールはmouseleave上に表示されたままになります。なぜどんなアイデア?不平を言う。
IEのどのバージョン? – Rado
あなたは.control-バーを試すことができます{ 表示:なし; } .control-barは、ビデオプレーヤーのコントロールのクラスです。別のオプションはdocument.getElementById( "myVideo")です。controls = false; – Rado
IE11。 document.getElementByIdが機能しました。ラドーに感謝します。 –