Skip to content

Instantly share code, notes, and snippets.

@reinh
Forked from anonymous/gist:3308
Created July 30, 2008 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reinh/3335 to your computer and use it in GitHub Desktop.
Save reinh/3335 to your computer and use it in GitHub Desktop.
// Convert to jQuery please...
var field = $('password_confirmation_field');
field.hide();
$('user_password').observe('focus', field.show.bind(field));
// This the best?
var confirmation = $('#password_confirmation_field').hide();
$('#user_password').focus(function () {
confirmation.show();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment