Created
June 24, 2012 13:53
-
-
Save M1ke/2983298 to your computer and use it in GitHub Desktop.
PHPNW12 Talk Submission Word Count
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var count=0; | |
$('#cf_field_4').unbind('keyup').keyup(function(){ | |
var words=($(this).val().split(" ").length); | |
if (words!=count) | |
{ | |
$(this).next().html(words+' words'); | |
} | |
count=words; | |
}); | |
var count2=0; | |
$('#cf_field_11').unbind('keyup').keyup(function(){ | |
var words=($(this).val().split(" ").length); | |
if (words!=count2) | |
{ | |
$(this).next().html(words+' words'); | |
} | |
count2=words; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment