}
};
-// Lame tip to let user know if its email is valid. See bug 22449
-// Only bind once for 'blur' so that the user can fill it in without errors
-// After that look at every keypress for direct feedback if it was invalid onblur
-$( '#wpNewEmail' ).one( 'blur', function() {
- if ( $( '#mw-emailaddress-validity' ).length === 0 ) {
- $(this).after( '<label for="wpNewEmail" id="mw-emailaddress-validity"></label>' );
- }
- updateMailValidityLabel( $(this).val() );
- $(this).keyup( function() {
+$( document ).ready( function() {
+ // Lame tip to let user know if its email is valid. See bug 22449
+ // Only bind once for 'blur' so that the user can fill it in without errors
+ // After that look at every keypress for direct feedback if it was invalid onblur
+ $( '#wpNewEmail' ).one( 'blur', function() {
+ if ( $( '#mw-emailaddress-validity' ).length === 0 ) {
+ $(this).after( '<label for="wpNewEmail" id="mw-emailaddress-validity"></label>' );
+ }
updateMailValidityLabel( $(this).val() );
+ $(this).keyup( function() {
+ updateMailValidityLabel( $(this).val() );
+ } );
} );
} );