шаблон 1 - аккордеон
There is no design without discipline. There is no discipline without.
Zero Block
Click "Block Editor" to enter the edit mode. Use layers, shapes and customize adaptability. Everything is in your hands.
Tilda Publishing
create your own block from scratch
There is no design without discipline.
Zero Block
Click "Block Editor" to enter the edit mode. Use layers, shapes and customize adaptability. Everything is in your hands.
Tilda Publishing
create your own block from scratch
There is no discipline without intelligence.
Zero Block
<script>
$( document ).ready(function() {
//Прописываем ID Блоков Контентаvar accordContent = ["#rec184601495","#rec184601866","#rec184603132"];
//Добавляем классы к нашим блокамlet i = 0; let number = 0;
for(let i = 0; i < accordContent.length; i++){
$(accordContent[i]).addClass('accordC').hide(); };
$( 'a[href="#accordicon"]' ).addClass('accordicon');
$( 'a[href="#accord"]' ).addClass('accord');
$( '.accordicon' ).click(function(e) {e.preventDefault();});
$( '.accord' ).click(function(e) {e.preventDefault();
//Вычисляем заголовок if(!$(this).hasClass("accblk") ){
$( '.accord' ).removeClass('accblk');
$(this).addClass('accblk');
$('.accordC').slideUp(500); $('.accordicon').show(500);
number = $('.accord').index(this);
$(accordContent[number]).slideToggle(300);
$('.accordicon:eq('+number+')').toggle(300);
}else{
$( '.accord' ).removeClass('accblk');
$('.accordC').slideUp(500); $('.accordicon').show(500);
};
}); });
</script>
Tilda Publishing
в коде т 123 html заменить названия блоков.
шаблон 2 -
шаблон 3 -