I want to show a welcome message simulating a write from keyboard. I try to do it like that, but I can't achieve it:
$(function(){
$('h2').text(''); //delete the previous text
var msg = 'Welcome'; //new text for the h2 element
var phrase = '';
for(var i=0; i<msg.length; i++){
phrase += msg[i];
$('h2').text(phrase).delay(10000);//here i want to pause
}
});