Guest User

Untitled

a guest
Jul 17th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. function ForgotPasswordForm() {
  2.  
  3. this.form = $('#account_fpw_form');
  4. this.submitButton = $('#account_fpw_submit');
  5.  
  6. this.submit = function() {
  7. return false;
  8. };
  9.  
  10. this.submitOn = function() {
  11. this.submitButton.toggleClass('greenButton',true);
  12. };
  13.  
  14. this.submitOff = function() {
  15. this.submitButton.toggleClass('greenButton',false);
  16. };
  17.  
  18. this._initEvents = function() {
  19. var self = this;
  20. this.form.submit(function() { return self.submit(); });
  21. this.submitButton.bind('mousedown', function() { self.submitOn(); });
  22. this.submitButton.bind('mouseup', function() { self.submitOff(); });
  23. };
  24.  
  25. this._initEvents();
  26.  
  27. };
  28.  
  29. var HM = {};
  30. $(document).ready(function(){
  31. HM.forgotPasswordForm = new ForgotPasswordForm();
  32. });
Add Comment
Please, Sign In to add comment