I have an input element and I want to keep checking the length of the contents and whenever the length becomes equal to a particular size, I want to enable the submit button
Do it the jQuery way:
$('#name').keyup(function() { alert('Content length has changed to: '+$(this).val().length); });