Open mattcasey opened 11 years ago
Would be good to have this merged..
Hi, I am trying to allow the user to pause and play the typer so that it is not distracting to the other content on the website. I tried adding an option and calling it with your method. Tweaked with jQuery pause and play.
var options = {
highlightSpeed : 20,
typeSpeed : 100,
clearDelay : 500,
typeDelay : 200,
clearOnHighlight : true,
typerDataAttr : 'data-typer-targets',
typerInterval : 2000,
OnDoneTyping : null,
PausePlayTyping: null
},
if (!text || text.length === 0) {
clearData($e);
PausePlayTyping();
return;
}
PausePlayTyping = function () {
$('.typer').click(function() {
if (this.paused == false) {
this.pause();
alert('typer paused');
} else {
this.play();
alert('typer playing');
}
})
};
Or is there a pause/play toggle already built into the plugin? If so, how do I call it?
would be nice to have some way to call a function after typing is done. I edited 3 places, now I can set $.typer.options.OnDoneTyping before the typing begins Line 14:
Line 77:
Line 258: