Line 97: | Line 97: | ||
} | } | ||
</style> | </style> | ||
− | <h1 data-typer="More than <b>2 million</b> people suffer from anaemia."></h1> | + | <h1 data-typer="More than <b>2 million</b> people suffer from anaemia." data-delay="0"></h1> |
+ | <h1 data-typer="<b>142500</b> of them will not see the end of this year."data-delay="4740"></h1> | ||
<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> | ||
Line 108: | Line 109: | ||
ch = 0; | ch = 0; | ||
− | (function typeIt() { | + | setTimeout(function typeIt() { |
if (ch > tot) return; | if (ch > tot) return; | ||
if(txt[ch]!="<") | if(txt[ch]!="<") | ||
Line 114: | Line 115: | ||
else $typer.html(txt.substring(0, ch+=3)); | else $typer.html(txt.substring(0, ch+=3)); | ||
setTimeout(typeIt, ~~(Math.random() * (pauseMax - pauseMin + 1) + pauseMin)); | setTimeout(typeIt, ~~(Math.random() * (pauseMax - pauseMin + 1) + pauseMin)); | ||
− | }()); | + | }(),$typer.data("delay")); |
}); | }); |
Revision as of 18:27, 30 October 2017