Difference between revisions of "Team:Dundee/Media"
Fmacfarlane (Talk | contribs) |
Fmacfarlane (Talk | contribs) |
||
Line 10: | Line 10: | ||
</center> | </center> | ||
</header> | </header> | ||
+ | |||
+ | |||
+ | <script type="text/javascript"> | ||
+ | |||
+ | function timeMsg(startime) { | ||
+ | |||
+ | var t = setTimeout("a("+startime+")", 5000); | ||
+ | |||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | function a(startime) { | ||
+ | |||
+ | $("#player")[0].play(); | ||
+ | |||
+ | $("#player")[0].currentTime = startime; | ||
+ | |||
+ | } | ||
+ | |||
+ | function song_onClick(item) { | ||
+ | |||
+ | var startTime = item.id; | ||
+ | |||
+ | var songSrc = item.title; | ||
+ | |||
+ | alert(songSrc + startTime); | ||
+ | |||
+ | $("#player")[0].pause(); | ||
+ | |||
+ | $("#player")[0].src = songSrc; | ||
+ | |||
+ | $("#player")[0].load(); | ||
+ | |||
+ | timeMsg(startTime); | ||
+ | |||
+ | } | ||
+ | |||
+ | </script> | ||
<body> | <body> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </audio> | + | <audio id="player" src="https://static.igem.org/mediawiki/2015/0/0b/TeamDundee-Radio_Scotland_2015_iGEM.mp3" controls="controls" autoplay></audio> |
− | </body> | + | |
+ | <div class="song" title="https://static.igem.org/mediawiki/2015/0/0b/TeamDundee-Radio_Scotland_2015_iGEM.mp3" id="20" onclick="song_onClick(this)"> | ||
+ | |||
+ | Maid with the Flaxen Hair | ||
+ | |||
+ | </div> | ||
+ | |||
+ | </body> | ||
+ | |||
+ | |||
</html> | </html> | ||
{{:Team:Dundee/navbar}} | {{:Team:Dundee/navbar}} | ||
{{:Team:Dundee/footer}} | {{:Team:Dundee/footer}} |
Revision as of 09:14, 8 August 2015
Maid with the Flaxen Hair