Skip to content

Commit 3bdd529

Browse files
authored
hover vídeo com jquery
1 parent dd45e1a commit 3bdd529

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

video.html hover-video-com-jquery.html

+1-13
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,13 @@
1717
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script>
1818
<script>
1919
/*JQuery*/
20-
/*
2120
var $video = $('#video');
2221
$video.on('mouseenter focus', function(){
2322
$video.get(0).play();
2423
});
2524
$video.on('mouseout blur', function(){
2625
$video.get(0).pause();
2726
});
28-
*/
29-
30-
/*Javascript*/
31-
var video = document.getElementById('video')
32-
video.addEventListener('mouseover', function() {
33-
video.play()
34-
}, false);
35-
36-
video.addEventListener('mouseout', function() {
37-
video.pause()
38-
}, false);
3927
</script>
4028
</body>
41-
</html>
29+
</html>

0 commit comments

Comments
 (0)