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

Line 101: Line 101:
 
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet">  
 
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet">  
 
<script>
 
<script>
 +
function typeIt(typer) {
 +
    if (ch > tot) return;
 +
    if(txt[ch]!="<")
 +
    typer.html(txt.substring(0, ch++));
 +
    else typer.html(txt.substring(0, ch+=3));
 +
    setTimeout(typeIt(typer), ~~(Math.random() * (pauseMax - pauseMin + 1) + pauseMin));
 +
  }
 
$("[data-typer]").attr("data-typer", function(i, txt) {
 
$("[data-typer]").attr("data-typer", function(i, txt) {
  
Line 108: Line 115:
 
     pauseMin = 40,
 
     pauseMin = 40,
 
     ch = 0;
 
     ch = 0;
 
function typeIt(typer) {
 
    if (ch > tot) return;
 
    if(txt[ch]!="<")
 
    typer.html(txt.substring(0, ch++));
 
    else typer.html(txt.substring(0, ch+=3));
 
    setTimeout(typeIt, ~~(Math.random() * (pauseMax - pauseMin + 1) + pauseMin));
 
  }
 
 
   setTimeout(typeIt($typer),$typer.data("delay"));
 
   setTimeout(typeIt($typer),$typer.data("delay"));
  

Revision as of 18:30, 30 October 2017

Contents

Designed by Aleksandur Murfitt