I have a project in which I have to add a registration form and I want to to validate that the password and confirm fields are equal without clicking the register button.
$box = $('input[name=showPassword]'); $box.focus(function(){ if ($(this).is(':checked')) { $('input[name=pswd]').attr('type', 'password'); } else { $('input[name=pswd]').attr('type', 'text'); } })