success: function(data) {
var streets = jQuery.parseJSON(data),
opts = '';
console.log(streets); // вывод переменной в консоль браузера
// перебор js объекта
for (var key in streets) {
if (!streets.hasOwnProperty(key)) continue;
var street = streets[key];
opts += "<option value='" + street.id + "'>" + street.street + "</option>";
}
},
error: function(){
alert("Ошибка! Улица не существует");
}
function randomInterval() {
setTimeout(() => {
it.circle();
randomInterval();
}, Math.random() * (900 - 700) + 700);
}
var $slick = $('.js-slider-gift'),
optionsDefault = {
rows: 2,
slidesToShow: 3,
slidesToScroll: 3,
arrows: true,
infinite: false,
dots: false,
prevArrow: '<a href="javascript:void();" class="b-product-carousel-gift__arrow b-product-carousel-gift__arrow--prev carousel-control left"></a>',
nextArrow: '<a href="javascript:void();" class="b-product-carousel-gift__arrow b-product-carousel-gift__arrow--next carousel-control right"></a>',
responsive: [
{
breakpoint: 1300,
settings: {
rows: 2,
slidesToShow: 2,
slidesToScroll: 2,
}
}
]
},
optionsMin = {
slidesToShow: 1,
slidesToScroll: 1,
infinite: false,
mobileFirst: true,
arrows: false,
variableWidth: true,
responsive: [
{
breakpoint: 599,
settings: {
slidesToShow: 2
}
}
]
};
$(document).ready(function() {
$slick.slick();
setOptionsSlider();
});
$(window).resize(function () {
setOptionsSlider();
});
function setOptionsSlider() {
var width = window.innerWidth || document.body.clientWidth,
options;
options = width < 960 ? optionsMin : optionsDefault;
$slick.slick('slickSetOption', options)
}
let array = {
window: {
settings: {
key1: 1,
key2: 2
}
}
};
console.log(array['window']['settings']);
console.log(array.window.settings);
$(document).ready(function() {
if(location.hash) $('a[href="' + location.hash + '"]').click()
})
var email = $('#form2email').val() || 'Нет';
if(empty($_POST['e-mail'])) $_POST['e-mail'] = 'Нет';