How to add jQuery any processing to dynamically added element
http://api.jquery.com/live/ - Live was designed for this purpose.
Given the added text field <input type='text' id='mytextbox'></input> , then this would be useful: ( NOTE : I recommend that you add an identifier to the text field if it will be displayed only once, or useful class name if it will be added again ~ Update the selector below to reflect the identifier or class)
$('#mytextbox').live('keyup', function(event){ if ( $(this).val() == "fail value" ) { $(this).val() = "good value"; } });
It really depends on how you want to test it. The initial question doesn't really show how you are checking it now (if I am missing something)
source share