$('.payment-innovation .list-block').each(function() {
let items = $(this).find('ul li');
items.css('opacity', 0);
for (var i = 0; i < items.length; i++) {
$(items[i]).delay(i * 400).animate({
opacity: 1
}, 400);
}
});
let head__click = $('.payment-innovation .list-block .list-block__head')
head__click.click(function() {
$(this).parent().find('.list-block__listing .item').fadeToggle()
})
$('.payment-innovation .item').css('opacity', 0);
$('.payment-innovation .list-block__head').click(function() {
const $this = $(this);
const $items = $this.closest('.list-block').find('.item');
const visible = $this.toggleClass('visible').hasClass('visible');
const duration = 400;
$items.each((i, n) => $(n)
.delay((visible ? i : $items.length - i - 1) * duration)
.animate({ opacity: +visible }, duration)
);
}).click();