Difference between revisions of "Team:NCKU Tainan/test video"

Line 2: Line 2:
  
 
<html>
 
<html>
 +
 +
<head>
 +
<script src="https://2017.igem.org/Template:NCKU_Tainan/jquery_scrolly_js?action=raw&amp;ctype=text/javascript"></script>
 +
<script src="https://cdnjs.cloudflare.com/ajax/libs/skel/3.0.1/skel.min.js"></script>
 +
 +
 +
<script>
 +
// Banner.
 +
 +
if ($banner.length > 0) {
 +
 +
// IE fix.
 +
if (skel.vars.IEVersion < 12) {
 +
 +
$window.on('resize', function() {
 +
 +
var wh = $window.height() * 0.60,
 +
bh = $banner.height();
 +
 +
$banner.css('height', 'auto');
 +
 +
window.setTimeout(function() {
 +
 +
if (bh < wh)
 +
$banner.css('height', wh + 'px');
 +
 +
}, 0);
 +
 +
});
 +
 +
$window.on('load', function() {
 +
$window.triggerHandler('resize');
 +
});
 +
 +
}
 +
 +
// Video check.
 +
var video = $banner.data('video');
 +
 +
if (video)
 +
$window.on('load.banner', function() {
 +
 +
// Disable banner load event (so it doesn't fire again).
 +
$window.off('load.banner');
 +
 +
// Append video if supported.
 +
if (!skel.vars.mobile
 +
&& !skel.breakpoint('large').active
 +
&& skel.vars.IEVersion > 9)
 +
$banner.append('<video autoplay loop><source src="' + video + '.mp4" type="video/mp4" /><source src="' + video + '.webm" type="video/webm" /></video>');
 +
 +
});
 +
 +
// More button.
 +
$banner.find('.more')
 +
.addClass('scrolly');
 +
 +
}
 +
</script>
 +
</head>
  
 
<body>
 
<body>

Revision as of 07:11, 31 October 2017