Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default class Modal {
- constructor(jqueryModal){
- this.modal = jqueryModal;
- this.password = jqueryModal.find('#password');
- }
- initClickListeners(){
- console.log(this.password); // input#password ...
- this.modal.find("#show-password").click(function(e){
- console.log(this.password); // undefined
- }
- }
- }
- $(document).ready(function () {
- let accModal = new Modal($('#acc-modal'));
- accModal.initClickListeners();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement