Reputation: 11010
I'm running into errors because an event binder in jQuery is attached to 'keyup' and 'blur'. But when I remove the input from the DOM that seems to fire the blur event, thus re-running the handler on a non-existent DOM input.
Upvotes: 3
Views: 1768
Reputation: 7356
You can validate this
in the handler when the event is fired
if (this && $(this).length > 0 ) { /*do stuff*/ }
Upvotes: 0