How to Play a Video on Hover [Elementor Tutorial]

January 7, 2022

In this Elementor tutorial I will show you how to play a video on hover. This can be a handy trick if you want more interaction on your page.

Note: This tutorial won’t cover how to do this effect with third party video platforms like YouTube and Vimeo. You will need to upload your own mp4 files to pull off this effect.

Timestamps:

  • 0:00 Introduction
  • 0:28 Add HTML Code
  • 3:25 Mobile HTML Code

HTML Code:

				
					<video onmouseover="this.play()" onmouseout="this.pause();this.currentTime=0;">
<source src="video.mp4" type="video/mp4"></source>
</video>
				
			

HTML Mobile Code:

				
					<video muted playsinline onmouseover="this.play()" onmouseout="this.pause();this.currentTime=0;" poster="image.jpg">
<source src="video.mp4" type="video/mp4"></source>
</video>
				
			

*Some of the links on this page are affiliate links, meaning we may receive a commission if you follow them. This allows us to continue providing free content and educational resources for you. Thank you for supporting our small business!

Share this post:

Facebook
Reddit
Twitter
Pinterest
LinkedIn
Email

More Free Resources

Join Our Community

Wicky Design YouTube

Get our latest videos by subscribing for FREE to our YouTube channel. New videos are uploaded weekly!