I have a youtube video like so…
<object id="video_1" class="a_video .......
However the css for a_video:
display:none;
Isn’t hiding it in IE.
Anyone know how to hide embedded youtube videos in IE?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If I remember correctly, I also had this problem before. Though my video would stop displaying, but I could hear it continuing to play in the background. The solution I used was to remove it completely and return it when needed.
Like this:
This function does a few things… first, it sets the HTML code associated to the video (the object) into a variable so it can remember it. Then, it gives a button the ability to show / hide the video (I’m assuming that is the intended behavior). So, when the button is clicked, it checks to see if a video is currently in the page, if it is, it removes it from the DOM, and if it isn’t, and takes the stored HTML and reapplies it to the video’s container.
Here’s the HTML that went with that: