Team:UNIK Copenhagen
From 2013.igem.org
SigneKarlsen (Talk | contribs) |
SigneKarlsen (Talk | contribs) |
||
(15 intermediate revisions not shown) | |||
Line 2: | Line 2: | ||
</body> | </body> | ||
<head> | <head> | ||
- | <link rel="image_src" href="https://static.igem.org/mediawiki/2013/ | + | <link rel="image_src" href="https://static.igem.org/mediawiki/2013/c/c3/UNIK_Copenhagen_Facebook_Thumbnail.jpg" /> |
</head> | </head> | ||
</html> | </html> | ||
Line 202: | Line 202: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | |||
- | |||
var slidePos = 0; | var slidePos = 0; | ||
var Width = 935; | var Width = 935; | ||
Line 210: | Line 208: | ||
var numPictures = 4; | var numPictures = 4; | ||
var pauseSlider = false; | var pauseSlider = false; | ||
+ | var youTubePlaying = false; | ||
+ | |||
+ | $(document).ready(function(){ | ||
+ | |||
+ | |||
function slide(targetSlide, par_function){ | function slide(targetSlide, par_function){ | ||
Line 226: | Line 229: | ||
function set_interval(){ | function set_interval(){ | ||
interval = window.setInterval(function(){ | interval = window.setInterval(function(){ | ||
- | if(pauseSlider) | + | if(pauseSlider || youTubePlaying) |
return; | return; | ||
slide(slidePos); | slide(slidePos); | ||
Line 300: | Line 303: | ||
</li> | </li> | ||
<li class="pictures"> | <li class="pictures"> | ||
- | <div id="slide_video | + | <div id="slide_video"> |
<div id="vid_text"> | <div id="vid_text"> | ||
<h3><span>Watch our video</span><br> | <h3><span>Watch our video</span><br> | ||
<span>Learn about our project</span></h3></div> | <span>Learn about our project</span></h3></div> | ||
<!-- <div id="vid"> | <!-- <div id="vid"> | ||
- | <iframe width="480" height="300" src="//www.youtube.com/embed/Y6xQG2dA0tA?feature=player_detailpage&wmode=opaque" frameborder="0" allowfullscreen></iframe> | + | <iframe width="480" height="300" src="//www.youtube.com/embed/Y6xQG2dA0tA?feature=player_detailpage&wmode=opaque" frameborder="0" allowfullscreen></iframe> |
</div> | </div> | ||
--> | --> | ||
Line 325: | Line 328: | ||
width: '480', | width: '480', | ||
videoId: 'Y6xQG2dA0tA', | videoId: 'Y6xQG2dA0tA', | ||
+ | playerVars: { | ||
+ | wmode: "opaque" | ||
+ | }, | ||
events: { | events: { | ||
'onReady': onPlayerReady, | 'onReady': onPlayerReady, | ||
Line 342: | Line 348: | ||
function onPlayerStateChange(event) { | function onPlayerStateChange(event) { | ||
if (event.data == YT.PlayerState.PLAYING) { | if (event.data == YT.PlayerState.PLAYING) { | ||
- | + | youTubePlaying = true; | |
} else{ | } else{ | ||
- | + | youTubePlaying = false; | |
} | } | ||
} | } | ||
Line 356: | Line 362: | ||
</ul> | </ul> | ||
</div> | </div> | ||
- | |||
- | |||
- | |||
</div> | </div> | ||
- | < | + | <br> |
- | + | ||
<div id="line"></div> | <div id="line"></div> | ||
<div id="four_photos"> | <div id="four_photos"> |
Latest revision as of 18:45, 3 October 2013