DoubleDiv iTyped

by Md. Atiquzzaman Soikat

HTML

<script src="https://unpkg.com/[email protected]"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<body>

<div><span id='element'></span></div>
<hr>
<div><span id='el'></span></div>

</body>

CSS

div+div{
  margin-top: 10px;
}

JavaScript

var element = document.querySelector('#element');
var el = document.querySelector('#el');
var ityped2 = Object.create(ityped);
var elConfig = {
  // required - for now, only accepting texts
    strings: ['And the other one is the same.', 'I have a general idea of what '],
    //optional
    typeSpeed: 55, //default
    //optional
    backSpeed: 30, //default
    //optional
    startDelay: 500, //default
    //optional
    backDelay: 500, //default
    //optional
    loop: false, //default
    //optional    
    showCursor: true, //default
    //optional    
    cursorChar: "|", //default
    // optional callback called once the last string has been typed
    onFinished: function(){}
};

ityped2.init(element,{
  // required - for now, only accepting texts
    strings: ['Dead simple animated typing.', 'No dependencies'],
    //optional
    typeSpeed: 55, //default
    //optional
    backSpeed: 30, //default
    //optional
    startDelay: 500, //default
    //optional
    backDelay: 500, //default
    //optional
    loop: false, //default
    //optional    
    showCursor: true, //default
    //optional    
    cursorChar: "|", //default
    // optional callback called once the last string has been typed
    onFinished: function(){
    	//ityped.init(el, elConfig);
    }
});

setTimeout(ityped.init(el, elConfig), 500);
//ityped.init(el, elConfig);