HTML5 video play/pause on hover
General Discussion
5
Posts
3
Posters
1.8k
Views
2
Watching
-
Hey leednl!
You can use this custom JS in "lay options" -> "custom html/css" -> "Custom <head> content"
<script> window.laytheme.on("newpageshown", function(){ jQuery('video').each(function(){ this.pause(); }); jQuery('video').on('mouseenter', function(){ this.play(); }); jQuery('video').on('mouseleave', function(){ this.pause(); }); }); </script>To make this work you need to check "autoplay" for all of your html5 videos in the gridder.
-
try disabling autoplay for the videos
also make sure the videos are muted
Online Users
Forgot your key, lost your files, need a previous Lay Theme or Addon version?
Go to www.laykeymanager.com