Answer the question
In order to leave comments, you need to log in
How to dynamically add and remove blocks?
I want to make the appearance of 3 blocks in turn and the 4th block appears, the 1st block disappears, i.e. so that the user always sees only 3 blocks. And display random information from the database in them. Tell me how to implement, because nothing intelligible comes out ...
what is now:
$('document').ready(function () {
setTimeout(function () {
setInterval(function () {
$('.pay_ways').append('<div class="pay_block"><div>');
}, 2000);
setInterval(function () {
$('.pay_block:last-child').detach();
}, 4000);
}, 2000);
})
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