Refael
asked on
HTML5 Video currentTime
Hello Experts,
I am trying to add an event listener "currentTime" when the video is playing so I can add/remove css styles to the relevant buttons e.g. #titlestadt.
How can I add it to my current script? Thanks!!!
I am trying to add an event listener "currentTime" when the video is playing so I can add/remove css styles to the relevant buttons e.g. #titlestadt.
How can I add it to my current script? Thanks!!!
var titlesVideo = $('#intro')[0];
$("#titlestadt").mouseover(function() {
titlesVideo.currentTime = 0;
$("#intro").addClass("playing");
titlesVideo.play();
}).mouseout(function() {
$("#intro").removeClass("playing");
});
$("#titleland").mouseover(function() {
titlesVideo.currentTime = 6;
$("#intro").addClass("playing");
titlesVideo.play();
}).mouseout(function() {
$("#intro").removeClass("playing");
});
$("#titlefluss").mouseover(function() {
titlesVideo.currentTime = 10.5;
$("#intro").addClass("playing");
titlesVideo.play();
}).mouseout(function() {
$("#intro").removeClass("playing");
});
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No worries. Take Care Refael.
ASKER