Team:Heidelberg

From 2013.igem.org

(Difference between revisions)
Line 364: Line 364:
   </div><!-- /.modal -->  
   </div><!-- /.modal -->  
<script type="text/javascript">
<script type="text/javascript">
 +
// Fires whenever a player has finished loading
 +
function onPlayerReady(event) {
 +
    event.target.playVideo();
 +
}
 +
 +
// Fires when the player's state changes.
 +
function onPlayerStateChange(event) {
 +
    // Go to the next video after the current one is finished playing
 +
    if (event.data === 0) {
 +
        $.fancybox.next();
 +
    }
 +
}
 +
   $(document).ready(function() {
   $(document).ready(function() {
     $("#langmodal").modal("show");
     $("#langmodal").modal("show");
Line 377: Line 390:
                 beforeShow  : function() {
                 beforeShow  : function() {
                     // Find the iframe ID
                     // Find the iframe ID
-
                     var id =
+
                     var id = $.fancybox.inner.find('iframe').attr('id');
-
                    $.fancybox.inner.find('iframe').attr('id');
+
                      
                      
                     // Create video player object and add event listeners
                     // Create video player object and add event listeners
Line 387: Line 399:
                         }
                         }
                     });
                     });
-
  });
+
                }
 +
            });
 +
    });
 +
   
 +
}
</script>
</script>
</html>
</html>
{{:Team:Heidelberg/Templates/Footer-Start}}
{{:Team:Heidelberg/Templates/Footer-Start}}

Revision as of 19:19, 26 October 2013