class ModalSignInSms {
constructor() {
this.$modalBtnSend = $('.js-btn');
}
async sendModal(e) {
e.preventDefault();
console.log('form sent')
// something happening
}
}
class SendReview extends ModalSignInSms {
constructor(el) {
super();
this.$modalBtnSend.on('click', async (e) => {
await this.sendModal(e);
await this.sendReview();
});
}
async sendReview() {
console.log('review sent');
}
}
Вот типа пример - https://jsfiddle.net/lucifer63/Lgth4abu/2/ . Видите, градус шизофрении очень высок. Придётся этот блок раскидывать прямо в текстовых нодах соответствующих элементов