fixing the typeit
This commit is contained in:
		
							parent
							
								
									c11045e50b
								
							
						
					
					
						commit
						a6862bec83
					
				
					 1 changed files with 4 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -1,20 +1,15 @@
 | 
			
		|||
{% set id = get_random(start=0, end=100) %}
 | 
			
		||||
{% 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>
 | 
			
		||||
    console.log("type");
 | 
			
		||||
    document.addEventListener("DOMContentLoaded", function () {
 | 
			
		||||
      new TypeIt("#{{ id }}", {
 | 
			
		||||
        strings: ["", {{ body }}, ""],
 | 
			
		||||
      new TypeIt('#{{ id }}', {
 | 
			
		||||
        strings: ['{{ body }}'],
 | 
			
		||||
        speed: 100,
 | 
			
		||||
        lifeLike: true,
 | 
			
		||||
        startDelay: 0,
 | 
			
		||||
        breakLines: true,
 | 
			
		||||
        waitUntilVisible: true,
 | 
			
		||||
        loop: false
 | 
			
		||||
      }).go();
 | 
			
		||||
    });
 | 
			
		||||
</script>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue