Advertisement
Guest User

Untitled

a guest
Feb 17th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function() {
  2.             var form = $('#register-or-login');
  3.             form.validate({
  4.                 messages: {
  5.                     _password: "",
  6.                     _username: ""
  7.                 }
  8.             });
  9.             $('[data-handler="clientHandler"]').on('click', function () {
  10.  
  11.  
  12.                 var passwordInput = $('#_password');
  13.  
  14.                 if ($(this).val() == 0) {
  15.                     passwordInput.attr('disabled', 'disabled');
  16.                     passwordInput.removeClass('error');
  17.                     form.attr('action', $(this).data('form-url'));
  18.                 } else {
  19.                     passwordInput.removeAttr('disabled');
  20.                     form.attr('action', $(this).data('form-url'));
  21.                 }
  22.             });
  23.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement