Jamie Skinner's Profile
Reputation: 0
Apprentice
- Group:
- New Members
- Active Posts:
- 3 (0.01 per day)
- Joined:
- 03-June 12
- Profile Views:
- 133
- Last Active:
Jun 05 2012 03:46 AM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: video plays on mouse over but not with multiple videos
Posted 5 Jun 2012
Thanks very much that worked great, thanks for your time -
In Topic: video plays on mouse over but not with multiple videos
Posted 4 Jun 2012
ok thanks, have tried class name but it still doesn't want to work.
<div class="videoone"> <a href="video/speechlrg.mp4"> <video id="video1" loop> <source src="video/speech.mp4" type="video/mp4"></source> </video> </a> </div> <div class="videoone"> <a href="video/identlrg.mp4"> <video id="video2" loop> <source src="video/ident.mp4" type="video/mp4"></source> </video> </a> </div>
Js
document.addEventListener('mouseover',hoverVideo,false); var vid = document.getElementById('video1'); function hoverVideo(e) { if(e.target == vid) { vid.play(); this.addEventListener('mouseout',hideVideo,false); } } function hideVideo(e) { if(e.target == vid) { vid.pause(); } }
var vid = document.getElementById('video1');
This is what i need to change i think, i need to target multiple id's

As I hover over each I want that video to play, i can get one to work but not another, can anyone help?
cheers
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Private
Friends
Jamie Skinner hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
Jamie Skinner has no profile comments yet. Why not say hello?