$(function() { $('textarea').keyup(checkSpeed); //when keyup in textarea then checkSpeed function called }); function checkSpeed() {}