enctype="multipart/form-data"
768: {
enabled: false,
slidesPerView: 5,
}
let breakpoint_mobile_min = window.matchMedia('(min-width: 768px)'),
projectInit = false,
projectSlider= Swiper;
function projectSliderInit() {
if (breakpoint_mobile_min.matches) {
if (projectInit) {
if ($('#slider3').hasClass('swiper-initialized')) {
projectSlider.destroy();
projectInit = false;
}
}
} else {
if (!projectInit) {
projectInit = true;
projectSlider= new Swiper('#slider3', {
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
enabled: false, //определитесь нужны вам стрелки или нет
},
pagination: {
el: '.swiper-pagination',
clickable: true,
},
slidesPerView: 1,
});
}
}
}
$(window).on('resize load', function () {
projectSliderInit();
});
const mySwiper = new Swiper('.slider-3steps', {
scrollbar: {
el: document.getElementById('swiperScrollbar') //где swiperScrollbar - id скорллбара соответственно
},
});
let containers = document.getElementsByClassName('promo-group__swiper-container');
Array.from(containers).forEach(function(element) {
var swiper = new Swiper(element, {
navigation: {
nextEl: element.querySelector('.swiper-button-next'),
prevEl: element.querySelector('.swiper-button-prev')
}
});
});
<div class="slider-wrapper">
<div class="swiper">
<div class="swiper-wrapper">
<div class="swiper-slide">Slide 1</div>
<div class="swiper-slide">Slide 2</div>
<div class="swiper-slide">Slide 3</div>
</div>
</div>
<!-- Кнопки -->
<div class="myslider-prev swiper-button-prev"></div>
<div class="myslider-next swiper-button-next"></div>
</div>
var swiper = new Swiper('.swiper', {
...тут ваши прочие параметры
navigation: {
nextEl: '.myslider-next',
prevEl: '.myslider-prev',
},
});
$result = array();
if (!$stmt->rowCount()) {
$result['error_login'] = "Пользователь с такими данными не зарегистрирован";
echo json_encode($result, JSON_UNESCAPED_UNICODE);
}
...
$_SESSION['user_id'] = $user['id'];
$result['us3r_id'] = $_SESSION['user_id'];
echo json_encode($result, JSON_UNESCAPED_UNICODE);
dataType: "json"
$(document).ready(function() {
$('.uk').click(function() {
$(this).toggleClass('open');
$('.cardC').toggleClass('shown'); //например класс shown будет отвечать за состояние показан-скрыт
});
});