Advertisement
Guest User

Untitled

a guest
Jul 29th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export default class Modal {
  2.     constructor(jqueryModal){
  3.         this.modal = jqueryModal;
  4.         this.password = jqueryModal.find('#password');
  5.     }
  6.     initClickListeners(){
  7.         console.log(this.password); // input#password ...
  8.         this.modal.find("#show-password").click(function(e){
  9.             console.log(this.password); // undefined
  10.         }
  11.     }
  12. }
  13.  
  14. $(document).ready(function () {
  15.     let accModal = new Modal($('#acc-modal'));
  16.     accModal.initClickListeners();
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement