Dantes (обсуждение | вклад) Нет описания правки |
Dantes (обсуждение | вклад) (Отмена правки 18773, сделанной Dantes (обсуждение)) Метка: отмена |
||
| Строка 1: | Строка 1: | ||
$(document).ready(function () { | $(document).ready(function () { | ||
// | // Анимация раскрытия контента | ||
$('. | $('.collapsible-header').click(function () { | ||
var | var content = $(this).next('.collapsible-content'); | ||
content.slideToggle(300, function() { | |||
// Анимация появления элементов после раскрытия | |||
$(this).find('li').each(function (index) { | |||
$(this).css('animation-delay', (index * 0.1) + 's'); | |||
$(this).addClass('visible'); | |||
}); | |||
}); | |||
$(this).toggleClass('open'); | |||
$ | |||
}); | }); | ||
// | // Устанавливаем цвет границы из data-атрибута | ||
$('. | $('.recipe-card').each(function () { | ||
var | var borderColor = $(this).attr('data-border'); | ||
if (borderColor) { | |||
$(this).css('border-color', borderColor); | |||
if ( | |||
} | } | ||
}); | }); | ||
}); | }); | ||
Версия от 18:07, 3 мая 2025
$(document).ready(function () {
// Анимация раскрытия контента
$('.collapsible-header').click(function () {
var content = $(this).next('.collapsible-content');
content.slideToggle(300, function() {
// Анимация появления элементов после раскрытия
$(this).find('li').each(function (index) {
$(this).css('animation-delay', (index * 0.1) + 's');
$(this).addClass('visible');
});
});
$(this).toggleClass('open');
});
// Устанавливаем цвет границы из data-атрибута
$('.recipe-card').each(function () {
var borderColor = $(this).attr('data-border');
if (borderColor) {
$(this).css('border-color', borderColor);
}
});
});