Mouseover and Mouseout javascript not working in Firefox -


I have written some basic javascript code to work with video on my website. Basically I embed video content A transparent and clickable div is inserted on the video, when the hidden video on it will play the video behind it, then stop when the mouse is moved. It works flawlessly on Chrome and Safari (IE is not tested, I work on Mac), but not on Firefox, not playing video. I have searched here and elsewhere for one reason, but nothing has been found. I have started playing with Javascript in the last few weeks, so I will not be surprised if I have clarified something!

  & lt; Div class = "sectionWrapper" & gt; & Lt; A href = "http://weathereddown.co.uk" & gt; & Lt; Div id = "sales-section" square = "video-block" onmouseover = "playvideo1 ()" onmouseout = "playvideo1 ()" & gt; & Lt; / Div & gt; & Lt; / A & gt; & Lt; Div class = "videoWrapper" & gt; & Lt; Div id = "wistia_92lscndvjx" class = "wistia_embed" style = "width: 900px; height: 506px;" & Gt; & Amp; Nbsp; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Script charset = "ISO-8859-1" src = "// fast.wistia.com/assets/external/E-v1.js"></script> & Lt; Script & gt; WistiaEmbed = Wistia.embed ("92lscndvjx", {videoFoam: true}); & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Var open = false; Function Play Video 1 () {Open =! Open (open == true) {document.getElementById ('wistia_8'). Play (); } And {document.getElementById ('wistia_8'). Stop (); }} & Lt; / Script & gt; & Lt; / Div & gt;  

The ID references ('wistia_8') are correct, they refer to the code generated on the page automatically by the Vista embed code.

Try using the same method as the W3Schools site but instead of hooking the button Use your mouseover event instead!

Hope it helps!


Comments