Answer the question
In order to leave comments, you need to log in
How on click to catch the clicked element which is dynamic?
function pagination() {
const main = $('.main'); //Элемент, в котором будут создаваться объекты, на которые можно нажимать
const nextPageBtn = main.find('.more-btn');// Элементы, на которые нужно нажимать
main.on('click', nextPageBtn, function (e) {
e.preventDefault();
console.log($(this));
});
}
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