I am using jquery to expand a div with a youtube embed, but when I click to expand the div size firefox stops the youtube embed playing. Chrome, IE9 etc do not stop the video playing when expanding the size. I am hoping someone will know of a solution.
$(document).ready(function() {
$("#wideView").click(function() {
$("#youtube-movie").toggleClass("wide");
});
});
Cheers
If you are sure that the code in your OP is the only thing that's happening then it's because
.wide dynamically changes overflow
which causes a repaint of children elements in firefox. That means a flash player will reset and stop playing.
Demo here: http://jsfiddle.net/rVbQ6/2/ (Do it in firefox and you will see)
The solution is to remove any overflow manipulations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With