Difference between revisions of "Team:Judd UK/berhfudf"

Line 107: Line 107:
 
         <div id="content-body">
 
         <div id="content-body">
 
<div>
 
<div>
 +
<div id="intro">
 
<h1 data-typer='"Iron deficiency affects more people than any other condition, constituting a public health condition of epidemic proportions" - WHO' data-delay="0"></h1>
 
<h1 data-typer='"Iron deficiency affects more people than any other condition, constituting a public health condition of epidemic proportions" - WHO' data-delay="0"></h1>
 
<h1 data-typer="Over <b>30%</b> of the global population suffers from iron deficiency anaemia."data-delay="11000"></h1>
 
<h1 data-typer="Over <b>30%</b> of the global population suffers from iron deficiency anaemia."data-delay="11000"></h1>
 
<h1 data-later="Here's what we're doing about it" style="display:none"></h1>
 
<h1 data-later="Here's what we're doing about it" style="display:none"></h1>
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet">  
+
</div>
 +
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:400" rel="stylesheet">  
 
<script>
 
<script>
 
setTimeout(function(){
 
setTimeout(function(){
Line 133: Line 135:
 
var ch=0;
 
var ch=0;
 
function typeIt() {
 
function typeIt() {
            console.log("here");
+
             if (ch > qs("[data-later]").dataset.later.length){ qs("#intro").opacity = "0"; setTimeout(function(){qs("#intro").display="none"},500); return;}
             if (ch > qs("[data-later]").dataset.later.length) return;
+
 
             if (qs("[data-later]").dataset.later[ch] != "<")
 
             if (qs("[data-later]").dataset.later[ch] != "<")
 
                 qs("[data-later]").innerHTML = qs("[data-later]").dataset.later.substring(0, ch++);
 
                 qs("[data-later]").innerHTML = qs("[data-later]").dataset.later.substring(0, ch++);
Line 147: Line 148:
 
     });
 
     });
 
     setTimeout(function() {
 
     setTimeout(function() {
         qsa(".JC #content-container>div h1, .JC #content-container>div b").forEach(function(e) {
+
         qsa(".JC #content-container>div div h1, .JC #content-container>div div b").forEach(function(e) {
 
             e.style.display = "none"
 
             e.style.display = "none"
 
         });
 
         });

Revision as of 22:11, 31 October 2017

Contents

Designed by Aleksandur Murfitt