Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2015
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. var passErrorCount = 0;
  2.  
  3. $("#customer-login #register input.btn").click(function(e) {
  4. e.preventDefault();
  5. var confirmPassword = $("#confirm_password").val();
  6. var password = $("#password_input").val();
  7. if (confirmPassword != password) {
  8. if(passErrorCount > 0) {
  9. $("#pass-errors").empty().fadeOut('fast');
  10. }
  11. $("#pass-errors").html("passwords don't match.").fadeIn('fast');
  12. passErrorCount++;
  13. return false;
  14. }
  15. else {
  16. $('form#create_customer').submit();
  17. }
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement