Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(window).scroll(function() {
- $('video').each(function(){
- if ($(this).is(":in-viewport")) {
- $(this)[0].play();
- } else {
- $(this)[0].pause();
- }
- })
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement