From 6b65c790ef45264db32afeb98301b51f6eac1bae Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Sun, 16 Jul 2017 23:59:15 +0200 Subject: [PATCH] Pas de JQuery pour le portfolio --- index.html | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index ad71cc3..f17283a 100644 --- a/index.html +++ b/index.html @@ -98,41 +98,41 @@
-
-
-
-
-
-
-
@@ -187,13 +187,12 @@ } }; - $('.portfolio-control').hover(function () { - if ($(this).prop('paused')) { - $(this).get(0).play(); - } else { - $(this).get(0).load(); - } - }); + var portfolio_videos = document.getElementsByClassName('video-portfolio'); + + for (video_div of portfolio_videos) { + video_div.onmouseover = function() {this.children[0].play()}; + video_div.onmouseout = function() {this.children[0].load()}; + }