WordPress
12
Вклад в тег
<script>
function openForm() {
document.getElementById("myForm").style.display = "block";
}
</script>
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<title>test script</title>
</head>
<body>
<button class="open-button" onclick="openForm()">show form</button>
<div class="form-popup" id="myForm">
<script type="text/javascript" src="http://xxxxxxxxxxx/view_webform_v2.js?u=1s&webforms_id=sX" data-webform-id="sX"></script>
</div>
<script>
function openForm() {
document.getElementById("myForm").style.display = "block";
}
</script>
</body>
</html>
function min_decimal($val) {
return 0.01; // Минимальное значение
}
add_filter("woocommerce_quantity_input_min", "min_decimal");
function step_decimal($val) {
return 0.01; // Шаг
}
add_filter("woocommerce_quantity_input_step", "step_decimal");
// Удаление и добавление своего фильтра проверки количества
remove_filter("woocommerce_stock_amount", "intval");
add_filter("woocommerce_stock_amount", "floatval");
swiper.on('slideChange', function () {
console.log('slide changed');
});
let video = querySelectorAll(".swiper-slide video");
video.currentTime = 0;
swiper.on('slideChange', function () {
let video = querySelectorAll(".swiper-slide video");
video.currentTime = 0;
});