//добвляем плагин галереи $('#gallery-img').lightGallery({ thumbnail: true, width: '1104px', height: '80vh', selector: '.item-image-gallery' });
$(document).ready(function() {
function createLightGallery() {
$('#gallery-img').lightGallery({
thumbnail: true,
width: '1104px',
height: '80vh',
selector: '.item-image-gallery'
});
}
createLightGallery();
})
createLightGallery();
contentType: 'application/json; charset=utf-8;'
dataType: 'json'
text-decoration: underline;
border-bottom: 1px solid black;
.bottom div a:hover, .bottom div a:active {
text-decoration: underline;
}
function surprise (a) {
a.show() ;
}
var timer = setTimeout (surprise, 15000, $("div.classname"));
function surprise (a) {
$(a).show() ;
}
var timer = setTimeout (surprise, 15000, 'div.classname');
$(document).ready(function() {
var jQueryminHeight = 280;
$("#desc_block").each(function() {
if ($(this).height() > jQueryminHeight) {
$(this).show();
$('#desc_block > div').addClass("product-about__description-content_state_collapsed");
$(this).append('<div class="opener" id="opener" style="font-size:16px;"><span>Читать полностью</span></div>');
}
});
$("#opener").click(function(){
$(".product-about__description-content_state_collapsed").css("max-height","none").removeClass();
});
})
var block_show = false;
function scrollTracking() {
if (block_show) {
return false;
}
var wt = $(window).scrollTop();
var wh = $(window).height();
var et = $('#stats').offset().top;
var eh = $('#stats').outerHeight();
var dh = $(document).height();
if (wt + wh >= et || wh + wt == dh || eh + et < wh) {
block_show = true;
$('.stats__digits').each(function (){
$(this).prop('Counter',0).animate({
Counter: $(this).text()
}, {
duration:4000,
easing: "swing",
step:function(now){
$(this).text(Math.ceil(now));
}
});
});
}
}
$(window).scroll(function(){
scrollTracking();
});
$(document).ready(function(){
scrollTracking();
});
<form class="form" method="post" id="sign_form"></form>
</form>
)name
<div class="container">
<img class="logo" src="img/logo.png" alt="logo">
<form class="form" method="post" id="sign_form">
<input id="ADMIN_USER_NAME" name="ADMIN_USER_NAME" class="user" type="text" placeholder="USERNAME" required>
<input id="ADMIN_USER_PASSWORD" name="ADMIN_USER_PASSWORD" class="pass" type="password" placeholder="PASSWORD" required>
<input class="button" type="submit" value="Sign in">
</form>
</div>
$("#sign_form").on("submit", function(event) {
event.preventDefault();
$.ajax({
type: "POST",
url: "http://localhost:8000/api/login",
data: $(this).serialize(),
dataType : "json",
success: function(data) {
console.log(data);
},
error: function(data) {
console.log("Внимание! произошла ошибка:" + data);
}
});
});
window.onload = function(){
var image = document.getElementsByClassName("image7");
//var maxWidth = "60%";
//var minWidth = "56%";
var i2, imgWidth;
for (i2 = 0; i2 < image.length; i2++) {
imgWidth = parseFloat(this.style.width);
image[i2].onmouseover = function(){
this.style.width = parseFloat(imgWidth + 10) + "%";
};
image[i2].onmouseout = function(){
this.style.width = imgWidth;
};
}
};
function checkParams() {
var name = $.trim($('#name').val());
var email = $.trim($('#email').val());
var phone = $.trim($('#phone').val());
var checkbox1 = $('#cakecheck').prop('checked');
var checkbox2 = $('#drinkcheck').prop('checked');
var checkbox3 = $('#personaldata').prop('checked');
if (checkbox1 && checkbox2 && checkbox3 && name.length > 0 && email.length > 0 && phone.length > 0) {
$('#submit').prop('disabled', false);
} else {
$('#submit').prop('disabled', true);
}
}
<form method="post" action="" id="forma" name="">
<div class="loyalty-form__checkboxes">
<div class="loyalty-form__checkbox">
<img class="loyalty-form__checkbox-img" src="<?php echo get_template_directory_uri() ?>/assets/images/static/checkcake.png" alt="">
<input type="checkbox" class="loyalty-form__checkbox-style" name="cake" id="cakecheck" onchange="checkParams()" required>
<label class="loyalty-form__checkbox-text" for="cakecheck">Хочу скидку на тортики <span class="loyalty-form__pink">*</span></label>
</div>
<div class="loyalty-form__checkbox">
<img class="loyalty-form__checkbox-img" src="<?php echo get_template_directory_uri() ?>/assets/images/static/checkdrink.png" alt="">
<input type="checkbox" class="loyalty-form__checkbox-style" name="drink" id="drinkcheck" onchange="checkParams()" required>
<label class="loyalty-form__checkbox-text" for="drinkcheck">Очень люблю кофе, хочу скидку <span class="loyalty-form__pink">*</span</label>
</div>
</div>
<input id="name" oninput="checkParams()" class="form-element" type="text" placeholder="Введите имя" autocomplete="off" required /><br>
<input id="email" oninput="checkParams()" class="form-element" type="email" placeholder="Введите e-mail" autocomplete="off" required /><br />
<input id="phone" oninput="checkParams()" class="form-element" type="tel" placeholder="Введите телефон" autocomplete="off" required/><br />
<input type="button" id="submit" value="Отправить" disabled>
<input type="checkbox" name="check" id="personaldata" onchange="checkParams()" required>
<label for="personaldata">Согласен(а) на обработку моих персональных данных</label>
</form>