var typed = new Typed("#typed", {
strings: ['Welcome to...', 'Hello!.', 'How are you?'],
onStop: (arrayPos, self) => {
console.log('onStop', arrayPos, self);
},
onStart: (arrayPos, self) => {
console.log('onStart', arrayPos, self)
}
});
var checkbox = document.querySelector("input[id=typstop]");
checkbox.addEventListener( 'change', function() {
if(this.checked) {
// Checkbox is checked..
typed.stop();
} else {
// Checkbox is not checked..
typed.start();
}
});