Answer the question
In order to leave comments, you need to log in
Why is the handler hung via jQuery executed in the constructor(){} of the class?
So it goes.
constructor () {
this.$close = $('.modal__close');
this.$close.on('click', this.close());
console.info('closed')
and it is displayed when the page is loaded. The click itself does not work.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question