Answer the question
In order to leave comments, you need to log in
How to play/pause video on hover over another block (jQuery)?
there is a page, both halves of it have a video background. to be precise, this new.volna.dance is
needed to start playing the video that the cursor is hovering over. originally did this:
$(".hustlevideo").mouseover(function(){
$this.play();
});
$(".hustlevideo").mouseout(function(){
$this.pause();
});
$("#hustle").mouseover(function(){
$(".hustlevideo").play();
});
$("#hustle").mouseout(function(){
$(".hustlevideo").pause();
});
Answer the question
In order to leave comments, you need to log in
It's not entirely clear, but maybe you just don't have enough block height? And isn't it easier to make a dropdown menu using js?
Instead of mouseover / mouseout use mouseenter / mouseleave.
$(...).play is not a function and $(...).pause is not a function
What am I doing wrong... ?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question