Skip to content

Instantly share code, notes, and snippets.

@TexRx
Forked from karlseguin/gist:852817
Created May 23, 2012 02:00
Show Gist options
  • Save TexRx/2772832 to your computer and use it in GitHub Desktop.
Save TexRx/2772832 to your computer and use it in GitHub Desktop.
simulate typing into an input
function simType(input, value)
{
var characters = value.split('');
var i = 0;
var id = setInterval(function()
{
input.value += characters[i++];
if (i == characters.length) { clearInterval(id); }
}, 75);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment