fixing the typeit
This commit is contained in:
parent
c11045e50b
commit
a6862bec83
|
@ -1,20 +1,15 @@
|
||||||
{% set id = get_random(start=0, end=100) %}
|
{% set id = get_random(start=0, end=100) %}
|
||||||
{% set id = "typeit-" ~ id %}
|
{% set id = "typeit-" ~ id %}
|
||||||
|
|
||||||
<script src="https://unpkg.com/typeit@8.7.1/dist/index.umd.js"></script>
|
<script src="https://unpkg.com/typeit/dist/index.umd.js"></script>
|
||||||
|
|
||||||
<{% if tag %}{{ tag }}{% else %}div{% endif %} id="{{ id }}">{{ body }}</{% if tag %}{{ tag }}{% else %}div{% endif %}>
|
<{% if tag %}{{ tag }}{% else %}div{% endif %} id="{{ id }}"></{% if tag %}{{ tag }}{% else %}div{% endif %}>
|
||||||
<script>
|
<script>
|
||||||
console.log("type");
|
console.log("type");
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
new TypeIt("#{{ id }}", {
|
new TypeIt('#{{ id }}', {
|
||||||
strings: ["", {{ body }}, ""],
|
strings: ['{{ body }}'],
|
||||||
speed: 100,
|
speed: 100,
|
||||||
lifeLike: true,
|
|
||||||
startDelay: 0,
|
|
||||||
breakLines: true,
|
|
||||||
waitUntilVisible: true,
|
|
||||||
loop: false
|
|
||||||
}).go();
|
}).go();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue