Timer events for jQuery

Code and demo are on github. I wanted to have a simple word count on the Kavanot editor, and this: $('span.wordcount').text($('#editor').val().split(/\s+/).length+' words'); is enough for me. Keeping it live is straightforward: $('#editor').on('input', function(){ $('span.wordcount').text(this.value.split(/\s+/).length+' words'); }); But that won't show the word count when the page is first loaded. The ready event only works on […]