Mouseover and Mouseout javascript not working in Firefox -
i've written basic javascript code work videos on website. have embedded video content, placed transparent , clickable div on video when hovered on play video behind it, pause when mouse moved away. works flawlessly on chrome , safari (not tested ie, work on mac) not @ on firefox, videos not play. i've searched here , other places reason why, haven't been able find anything. i've started playing javascript lastly couple of weeks wouldn't surprised if i've missed obvious!
<div class="sectionwrapper"> <a href="http://weathereddown.co.uk"> <div id="sales-section" class="video-block" onmouseover="playvideo1()" onmouseout="playvideo1()"></div> </a> <div class="videowrapper"> <div id="wistia_92lscndvjx" class="wistia_embed" style="width:900px;height:506px;"> </div> </div> <script charset="iso-8859-1" src="//fast.wistia.com/assets/external/e-v1.js"></script> <script> wistiaembed = wistia.embed("92lscndvjx", { videofoam: true }); </script> <script type="text/javascript"> var open = false; function playvideo1() { open = !open if (open == true) { document.getelementbyid('wistia_8').play(); } else { document.getelementbyid('wistia_8').pause(); } } </script> </div> the id references ('wistia_8') correct, refer code automatically generated on page wistia embed code.
try using same methods w3schools site instead of hooking buttons utilize mouseover mouseout events instead!
here
hope helps!
javascript firefox video mouseover mouseout
No comments:
Post a Comment