I have made a chatbox in jquery and i want to add the functionality to see "xyz is typing" for this i have written this code
setInterval("typing()", 1000);
function typing()
{
var name1= $("#name").val();
var n=$('#message').val().length();
if(n>1)
$('#shout').prepend(name1+'is typing');
}
But its not working. Someoen pls help...