I have the following code to bind some validation logic to be fired when a user updates the value of a textbox. I expect that the //Do some stuff here
code will execute when any of the textboxes it is bound to lose focus.
function RegisterHoursValidationHandlers() {
$('.topic-frame-body input[type=text]').live('change', function () {
//Do some stuff here
});
}
This works exactly as I expect in IE, Firefox and Safari. However, the event never fires in Chrome and I have no idea why.
UPDATE: I was able to get the desired effect by changing 'change'
to 'blur'
. Though this still doesn't explain why it doesn't worh with 'change'
.