JoeAtRevolutionUnltd
Programmer
I have a video gallery that lists all of the video links. The player is in a <div> with a unique class name and when a link is clicked that <div> is shows. The problem comes in IE7 and IE6. The videos load fine, but if you click one video then click another, the first continues to play.
Is there a way to stop the first video when the second is clicked?
Here is my jquery code
Is there a way to stop the first video when the second is clicked?
Here is my jquery code
Code:
<script language="JavaScript" type="text/javascript"> //VIDEO LIBRARY SCRIPT
$(document).ready(function(){
$(".center-thmb").click(function(){
document.getElementById("ru_videoPlayer").stop();
$("div.active").hide();
$("div.active").removeClass("active");
var show = $(this).attr("name");
$("."+show).show();
$("."+show).addClass('active');
})
});
</script>