File: /home/mirpogruzchikov.ru/public_html/wp-content/themes/mirpogruzchikov/front-page.php
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css" />
<link rel="stylesheet" href="<? bloginfo('template_url'); ?>/plugins/noUislider/nouislider.min.css">
<link rel="stylesheet" href="<? bloginfo('template_url'); ?>/css/icons.css">
<link rel="stylesheet" href="<? bloginfo('template_url'); ?>/css/style.css?v=1.6">
<? wp_head(); ?>
</head>
<body>
<header class="header">
<div class="container">
<div class="header__inner">
<nav class="header__nav">
<a class="header__linkLogo" href="#">
<img class="logo" src="<? bloginfo('template_url'); ?>/images/logo.png" alt="">
</a>
<ul class="menu">
<li class="menu__item">
<a data-goto=".section-about" class="menu__item-link goto" href="#">О компании</a>
</li>
<li class="menu__item">
<a data-goto=".section-world" class="menu__item-link goto" href="#">Преимущества</a>
</li>
<li class="menu__item">
<a data-goto=".section-wrapper" class="menu__item-link goto" href="#">Калькулятор</a>
</li>
<li class="menu__item">
<a data-goto=".section-what" class="menu__item-link goto" href="#">Погрузчики</a>
</li>
<li class="menu__item">
<a data-goto=".section-info" class="menu__item-link goto" href="#">Контакты</a>
</li>
<li class="menu__item menu__item--hidden">
<a class="menu__item-link goto link" href="<? the_field('telefon_href', 'option') ?>" onclick="ym(90805103, 'reachGoal', 'zvyz'); return true;">Обратная связь</a>
</li>
</ul>
</nav>
<a class="header__link link" href="<? the_field('telefon_href', 'option') ?>" onclick="ym(90805103, 'reachGoal', 'zvyz'); return true;">Обратная связь</a>
<div class="header__burger">
<div class="header__burger-line"></div>
</div>
</div>
</div>
</header>
<? if (have_rows('glavnyj_banner')) : ?>
<section class="multi">
<div class="container">
<div class="multi__swiper swiper">
<div class="multi__wrapper swiper-wrapper">
<? while (have_rows('glavnyj_banner')) : the_row();
$items = get_sub_field('slajder');
?>
<? if ($items) : ?>
<? foreach ($items as $item) : ?>
<div class="multi__slide swiper-slide">
<div class="multi__item">
<h1 class="multi__item-title">
<?= $item['zagolovok'] ?>
</h1>
<p class="multi__item-subtitle">
<?= $item['tekst'] ?>
</p>
<a data-goto=".section-what" class="multi__item-link link goto">Перейти к моделям</a>
</div>
<div class="multi__item">
<img class="multi__item-image" src="<?= $item['kartinka'] ?>" alt="<?= $item['zagolovok'] ?>">
</div>
</div>
<? endforeach; ?>
<? endif; ?>
<? endwhile; ?>
</div>
<div class="multi__pagination swiper-pagination"></div>
</div>
</div>
</section>
<? endif; ?>
<? if (have_rows('o_kompanii')) : ?>
<? while (have_rows('o_kompanii')) : the_row();
$foto_left = get_sub_field('foto_levaya_kolonka');
$title_left = get_sub_field('zagolovok_levaya_kolonka');
$text_left = get_sub_field('tekst_levaya_kolonka');
$foto_right = get_sub_field('foto_pravaya_kolonka');
$title_right = get_sub_field('zagolovok_pravaya_kolonka');
$text_right = get_sub_field('tekst_pravaya_kolonka');
$about_title = get_sub_field('o_kompanii_zagolovok');
$about_text = get_sub_field('o_kompanii_tekst');
?>
<section class="about section-about">
<div class="container">
<div class="about__inner">
<div class="about__card">
<img class="about__card-img" src="<?= $foto_left ?>" alt="<?= $title_left ?>">
<div class="about__card-text">
<p class="about__card-name"><?= $title_left ?></p>
<p><?= $text_left ?></p>
</div>
</div>
<div class="about__text">
<h3 class="about__title">О компании</h3>
<h2 class="about__subtitle"><?= $about_title ?></h2>
<p><?= $about_text ?></p>
</div>
<div class="about__box">
<div class="about__card">
<img class="about__card-img" src="<?= $foto_right ?>" alt="<?= $title_right ?>">
<div class="about__card-text">
<p class="about__card-name"><?= $title_right ?></p>
<p><?= $text_right ?></p>
</div>
</div>
</div>
</div>
</div>
</section>
<? endwhile; ?>
<? endif; ?>
<? if (have_rows('liczenzii')) : ?>
<section class="licenses">
<div class="container">
<div class="licenses__swiper swiper">
<div class="licenses__wrapper swiper-wrapper">
<? while (have_rows('liczenzii')) : the_row();
$items = get_sub_field('galereya');
?>
<? if ($items) : ?>
<? foreach ($items as $item) : ?>
<div class="licenses__slide swiper-slide">
<img src="<?= $item ?>" alt="<?= $item ?>">
</div>
<? endforeach; ?>
<? endif; ?>
<? endwhile; ?>
</div>
<div class="swiper-button-prev licenses__prev"></div>
<div class="swiper-button-next licenses__next"></div>
</div>
</div>
</section>
<? endif; ?>
<? if (have_rows('preimushhestva')) : ?>
<? while (have_rows('preimushhestva')) : the_row();
$image = get_sub_field('izobrazhenie');
$items = get_sub_field('preimushhestva');
?>
<section class="world section-world">
<div class="container">
<div class="world__inner">
<img class="world__img" src="<?= $image ?>" alt="<?= $image ?>">
<div class="world__content">
<div class="world__logo">
<img src="<? bloginfo('template_url'); ?>/images/logo.svg" alt="<? bloginfo('template_url'); ?>/images/logo.svg">
</div>
<? if ($items) : ?>
<div class="world__content-grid">
<? foreach ($items as $item) : ?>
<div class="world__content-item">
<img src="<?= $item['ikonka'] ?>" alt="<?= $item['zagolovok'] ?>">
<div>
<h3 class="world__content-title"><?= $item['zagolovok'] ?></h3>
<p><?= $item['tekst'] ?></p>
</div>
</div>
<? endforeach; ?>
</div>
<? endif; ?>
</div>
</div>
</div>
</section>
<? endwhile; ?>
<? endif; ?>
<section class="wrapper section-wrapper">
<div class="container">
<div class="wrapper__container">
<div class="wrapper__inner wrapper__inner--fork active">
<div class="calculator" id="calculator_fork">
<div class="calculator__inner">
<h3 class="calculator__title">Выберите необходимые
параметры погрузчика:</h3>
</div>
<div class="calculator__item" id="loader_type">
<p class="calculator__item-title calculator__item-title--mb">1. Тип погрузчика</p>
<div class="calculator__item-block">
<div class="calculator__item-elem calculator__item-elem--fork calculator__item-elem--active">Вилочные
погрузчики
</div>
<div class="calculator__item-elem calculator__item-elem--scoop">Ковшовые погрузчики</div>
</div>
<div class="calculator__item-box calculator__item-box--check">
<label class="label">
<input class="label__input check" type="checkbox" name="type" value="Электрический">
<span class="label__inputCustom"></span>
Электрический
</label>
<label class="label">
<input class="label__input check" type="checkbox" name="type" value="Дизельный">
<span class="label__inputCustom"></span>
Дизельный
</label>
<label class="label">
<input class="label__input check" type="checkbox" name="type" value="Газ-бензиновый">
<span class="label__inputCustom"></span>
Газ-бензиновый
</label>
</div>
</div>
<div class="calculator__item">
<p class="calculator__item-title">2. Вес ваших грузов, (тонн)</p>
<div class="calculator__item-box" id="fork_weight">
<div class="slider-tooltips"></div>
</div>
</div>
<div class="calculator__item">
<p class="calculator__item-title">3. Выберите максимальную высоту подъема, (м)</p>
<div class="calculator__item-box" id="fork_height">
<div class="slider-range"></div>
</div>
</div>
</div>
<form class="form" id="form_order_1">
<h3 class="form__title">Оставьте свои контакты и мы свяжемся
с Вами в течение 5 минут</h3>
<div class="form__inner">
<div class="form__box">
<p class="form__box-title">Как к Вам обращаться?</p>
<input class="form__box-input" type="text" name="name" placeholder="Введите Ваше имя">
</div>
<div class="form__box">
<p class="form__box-title">Номер телефона:</p>
<input class="form__box-input" type="tel" name="phone" placeholder="Введите Ваш номер телефона">
</div>
<div class="form__box">
<p class="form__box-title">Email:</p>
<input class="form__box-input" type="email" name="email" placeholder="Введите Ваш e-mail">
</div>
<button class="form__btn btn" id="form_order_1_submit">Заказать звонок</button>
<label class="label">
<input class="label__input check" type="checkbox" required>
<span class="label__inputCustom"></span>
Я согласен на обработку персональных данных
</label>
</div>
</form>
</div>
<div class="wrapper__inner wrapper__inner--scoop">
<div class="calculator" id="calculator_scoop">
<div class="calculator__inner">
<h3 class="calculator__title">Выберите необходимые
параметры погрузчика:</h3>
</div>
<div class="calculator__item">
<p class="calculator__item-title calculator__item-title--mb">1. Тип погрузчика</p>
<div class="calculator__item-block">
<div class="calculator__item-elem calculator__item-elem--fork calculator__item-elem--active">Вилочные
погрузчики
</div>
<div class="calculator__item-elem calculator__item-elem--scoop">Ковшовые погрузчики</div>
</div>
</div>
<div class="calculator__item">
<p class="calculator__item-title">2. Вес ваших грузов, (тонн)</p>
<div class="calculator__item-box" id="scoop_weight">
<div class="calculator__item-tooltips"></div>
</div>
</div>
<div class="calculator__item">
<p class="calculator__item-title">3. Выберите максимальную высоту подъема, (м)</p>
<div class="calculator__item-box" id="scoop_height">
<div class="calculator__item-range"></div>
</div>
</div>
</div>
<form class="form" id="form_order_2">
<h3 class="form__title">Оставьте свои контакты и мы свяжемся
с Вами в течение 5 минут</h3>
<div class="form__inner">
<div class="form__box">
<p class="form__box-title">Как к Вам обращаться?</p>
<input class="form__box-input" type="text" name="name" placeholder="Введите Ваше имя">
</div>
<div class="form__box">
<p class="form__box-title">Номер телефона:</p>
<input class="form__box-input" type="tel" name="phone" placeholder="Введите Ваш номер телефона">
</div>
<div class="form__box">
<p class="form__box-title">Email:</p>
<input class="form__box-input" type="email" name="email" placeholder="Введите Ваш e-mail">
</div>
<button class="form__btn btn" id="form_order_2_submit">Заказать звонок</button>
<label class="label">
<input class="label__input check" type="checkbox" required>
<span class="label__inputCustom"></span>
Я согласен на обработку персональных данных
</label>
</div>
</form>
</div>
</div>
<? if (have_rows('blok_s_pogruzchikami')) : ?>
<? while (have_rows('blok_s_pogruzchikami')) : the_row();
$vilochnye = get_sub_field('vilochnye');
$kovshovye = get_sub_field('kovshovye');
?>
<div class="what section-what">
<h2 class="what__title">Какие погрузчики у нас есть</h2>
<div class="what__box">
<div data-target="target1" class="what__box-btn what__box-btn--active">Вилочные погрузчики</div>
<div data-target="target2" class="what__box-btn">Ковшовые погрузчики</div>
</div>
<? if ($vilochnye) : ?>
<div data-info="target1" class="what__item what__item--first what__item--active what__item--opacity">
<? foreach ($vilochnye as $item) : ?>
<div class="what__content">
<img class="what__content-image" src="<?= $item['kartinka'] ?>" alt="<?= $item['zagolovok'] ?>">
<div class="what__content-box">
<h3 class="what__content-title"><?= $item['zagolovok'] ?></h3>
<p class="what__content-text"><?= $item['tekst'] ?></p>
</div>
</div>
<? endforeach; ?>
</div>
<? endif; ?>
<? if ($kovshovye) : ?>
<div data-info="target2" class="what__item">
<div class="what__inner">
<img class="what__inner-image" src="<?= $kovshovye['kartinka']['url'] ?>" alt="<?= $kovshovye['zagolovok'] ?>">
<div class="what__inner-box">
<h3 class="what__inner-title"><?= $kovshovye['zagolovok'] ?></h3>
<p class="what__inner-text"><?= $kovshovye['tekst'] ?></p>
</div>
</div>
</div>
<? endif; ?>
</div>
<? endwhile; ?>
<? endif; ?>
</div>
</section>
<section class="catalog section-catalog">
<div class="container">
<h2 class="catalog__title">Каталог погрузчиков</h2>
<div class="catalog__box">
<div data-targetCatalog="catalog1" class="catalog__box-btn catalog__box-btn--active">Вилочные погрузчики</div>
<div data-targetCatalog="catalog2" class="catalog__box-btn">Ковшовые погрузчики</div>
</div>
<div class="catalog__inner">
<div data-infoCatalog="catalog1" class="catalog__item catalog__item--active catalog__item--opacity">
<div class="catalog__forklift swiper">
<div class="catalog__wrapper swiper-wrapper">
<?
$args = array(
'posts_per_page' => -1,
'post_type' => 'post',
'cat' => 2, // Рубрика Мероприятия
'post_status' => 'publish',
'orderby' => 'publish_date',
'order' => 'asc'
);
?>
<?
$query = new WP_Query($args);
if ($query->have_posts()) :
$counter = 0;
while ($query->have_posts()) :
if ($counter === 12) : $counter = 0;
echo '</div>';
continue;
elseif ($counter === 0) : echo '<div class="catalog__slide swiper-slide">';
endif;
$query->the_post();
$counter++;
?>
<div class="catalog__card">
<img class="catalog__card-img" src="<?= get_the_post_thumbnail_url(); ?>" alt="<? the_title(); ?>">
<p class="catalog__card-title"><? the_title(); ?></p>
<div class="catalog__card-box">
<p class="catalog__card-text">Грузоподъемность</p>
<p class="catalog__card-text"><? the_field('gruzopodemnost'); ?></p>
</div>
<div class="catalog__card-box">
<p class="catalog__card-text">Высота подъёма (мм)</p>
<p class="catalog__card-text"><? the_field('vysota_podema'); ?></p>
</div>
<? if (have_rows('harakteristiki')) :
while (have_rows('harakteristiki')) : the_row(); ?>
<div class="catalog__card-box">
<p class="catalog__card-text"><? the_sub_field('harakteristika'); ?></p>
</div>
<? endwhile;
endif; ?>
<a data-goto=".section-info" class="catalog__link link goto" href="#">Заказать звонок</a>
</div>
<?
endwhile;
echo '</div>';
endif;
?>
<? wp_reset_postdata(); ?>
</div>
</div>
<div class="catalog__block">
<div data-goto=".section-catalog" class="goto catalog__forklift-prev swiper-button-prev"></div>
<div data-goto=".section-catalog" class="goto catalog__forklift-pagination swiper-pagination"></div>
<div data-goto=".section-catalog" class="goto catalog__forklift-next swiper-button-next"></div>
</div>
</div>
<div data-infoCatalog="catalog2" class="catalog__item">
<div class="catalog__bucket swiper">
<div class="catalog__wrapper swiper-wrapper">
<?
$args = array(
'posts_per_page' => -1,
'post_type' => 'post',
'cat' => 3, // Рубрика Мероприятия
'post_status' => 'publish',
'orderby' => 'publish_date',
'order' => 'asc'
);
?>
<?
$query = new WP_Query($args);
if ($query->have_posts()) :
$counter = 0;
while ($query->have_posts()) :
if ($counter === 12) : $counter = 0;
echo '</div>';
continue;
elseif ($counter === 0) : echo '<div class="catalog__slide swiper-slide">';
endif;
$query->the_post();
$counter++;
?>
<div class="catalog__card">
<img class="catalog__card-img" src="<?= get_the_post_thumbnail_url(); ?>" alt="<? the_title(); ?>">
<p class="catalog__card-title"><? the_title(); ?></p>
<div class="catalog__card-box">
<p class="catalog__card-text">Грузоподъемность</p>
<p class="catalog__card-text"><? the_field('gruzopodemnost'); ?></p>
</div>
<? if (have_rows('harakteristiki')) :
while (have_rows('harakteristiki')) : the_row(); ?>
<div class="catalog__card-box">
<p class="catalog__card-text"><? the_sub_field('harakteristika'); ?></p>
</div>
<? endwhile;
endif; ?>
<a data-goto=".section-info" class="catalog__link link goto" href="#">Заказать звонок</a>
</div>
<?
endwhile;
echo '</div>';
endif;
?>
<? wp_reset_postdata(); ?>
</div>
</div>
<div class="catalog__block">
<div data-goto=".section-catalog" class="goto catalog__bucket-prev swiper-button-prev"></div>
<div data-goto=".section-catalog" class="goto catalog__bucket-pagination swiper-pagination"></div>
<div data-goto=".section-catalog" class="goto catalog__bucket-next swiper-button-next"></div>
</div>
</div>
</div>
</div>
</section>
<section class="info section-info">
<div class="container">
<div class="info__inner">
<div class="info__item">
<h2 class="info__item-title">Отдел информации</h2>
<a class="info__item-link" href="<? the_field('telefon_href', 'option') ?>" onclick="ym(90805103, 'reachGoal', 'nomer'); return true;"><? the_field('telefon', 'option') ?></a>
<a class="info__item-link" href="<? the_field('email_href', 'option') ?>" onclick="ym(90805103, 'reachGoal', 'pochta'); return true;"><? the_field('email', 'option') ?></a>
<p class="info__item-text"><? the_field('adres', 'option') ?></p>
</div>
<form class="form" id="footer_form">
<div class="form__inner form__inner--border">
<div class="form__box">
<p class="form__box-title">Как к Вам обращаться?</p>
<input class="form__box-input" type="text" name="name" placeholder="Введите Ваше имя">
</div>
<div class="form__box">
<p class="form__box-title">Номер телефона:</p>
<input class="form__box-input" type="tel" name="phone" placeholder="Введите Ваш номер телефона" required>
</div>
<div class="form__box">
<p class="form__box-title">Email:</p>
<input class="form__box-input" type="email" name="email" placeholder="Введите Ваш e-mail">
</div>
<button class="form__btn btn" id="footer_form_submit">Заказать звонок</button>
<label class="label">
<input class="label__input check" type="checkbox" required>
<span class="label__inputCustom"></span>
Я согласен на обработку персональных данных
</label>
</div>
</form>
</div>
</div>
</section>
<footer class="footer section-footer">
<div class="container">
<div class="footer__inner">
<div class="footer__item">
<? if (get_field('instagram', 'options')) : ?>
<a class="footer__link icon-inst" href="<? the_field('instagram', 'option') ?>" target="_blank"></a>
<? endif; ?>
<? if (get_field('telegram', 'options')) : ?>
<a class="footer__link icon-telega" href="<? the_field('telegram', 'option') ?>" target="_blank"></a>
<? endif; ?>
<? if (get_field('vk', 'options')) : ?>
<a class="footer__link icon-vk" href="<? the_field('vk', 'option') ?>" target="_blank"></a>
<? endif; ?>
</div>
<div class="footer__item">
<img class="footer__logo" src="<? bloginfo('template_url'); ?>/images/logo-footer.png" alt="">
</div>
<a class="footer__development" href="https://spaceapp.ru/yslugi" target="_blank">Разработка сайта</a>
</div>
</div>
</footer>
<? wp_footer(); ?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://unpkg.com/swiper@8/swiper-bundle.min.js"></script>
<script src="<? bloginfo('template_url'); ?>/plugins/jQuery.maskedinput/jquery.maskedinput.min.js"></script>
<script src="<? bloginfo('template_url'); ?>/plugins/noUislider/nouislider.min.js"></script>
<script src="<? bloginfo('template_url'); ?>/plugins/noUislider/wNumb.min.js"></script>
<script src="<? bloginfo('template_url'); ?>/js/main.js?v=2.4"></script>
<!-- Yandex.Metrika counter -->
<script type="text/javascript">
(function(m, e, t, r, i, k, a) {
m[i] = m[i] || function() {
(m[i].a = m[i].a || []).push(arguments)
};
m[i].l = 1 * new Date();
for (var j = 0; j < document.scripts.length; j++) {
if (document.scripts[j].src === r) {
return;
}
}
k = e.createElement(t), a = e.getElementsByTagName(t)[0], k.async = 1, k.src = r, a.parentNode.insertBefore(k, a)
})
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
ym(90805103, "init", {
clickmap: true,
trackLinks: true,
accurateTrackBounce: true,
webvisor: true
});
</script>
<noscript>
<div><img src="https://mc.yandex.ru/watch/90805103" style="position:absolute; left:-9999px;" alt="" /></div>
</noscript>
<!-- /Yandex.Metrika counter -->
<script src="//code.jivo.ru/widget/aJnPlbv798" async></script>
<script>
function footer_form_submit() {
var name = $('#footer_form [name=name]').val();
var phone = $('#footer_form [name=phone]').val();
var email = $('#footer_form [name=email]').val();
console.log(name + " " + phone);
var regexp = /^\+7\s\(\d{3}\)\s\d{3}-\d{4}$/;
var result = regexp.test(phone);
if (result) {
$.ajax({
url: "/mail.php",
type: "post",
data: {
name: name,
phone: phone,
email: email,
},
success: function() {
ym(90805103, 'reachGoal', 'zvonok');
alert("Заявка успешно отпрвлена!");
}
});
}
}
if (document.getElementById('footer_form_submit')) {
document.getElementById('footer_form_submit').onclick = function(e) {
e.preventDefault();
footer_form_submit();
}
}
function form_order_1_submit() {
var name = $('#form_order_1 [name=name]').val();
var phone = $('#form_order_1 [name=phone]').val();
var email = $('#form_order_1 [name=email]').val();
var order = "";
order += "<b>Выбрано:</b><br>Вилочные погрузчики<br>";
var typeArr = $('#loader_type input[name=type]');
if (typeArr) {
order += "<b>Тип:</b><br>";
}
typeArr.each(function(index, item) {
var item = $(item);
if (item.is(':checked')) {
order += item.val() + "<br>";
console.log(order);
}
});
var weight = $('#fork_weight [aria-valuetext]').attr('aria-valuetext');
var height = $('#fork_height [aria-valuetext]').attr('aria-valuetext');
order += "<b>Вес грузов, (тонн):</b> " + weight + "<br>";
order += "<b>Максимальная высота подъема, (м):</b> " + height + "<br>";
console.log(name + " " + phone);
var regexp = /^\+7\s\(\d{3}\)\s\d{3}-\d{4}$/;
var result = regexp.test(phone);
if (result) {
$.ajax({
url: "/mail.php",
type: "post",
data: {
name: name,
phone: phone,
email: email,
order: order,
},
success: function() {
ym(90805103, 'reachGoal', 'zayvka');
alert("Заявка успешно отпрвлена!");
}
});
}
}
if (document.getElementById('form_order_1_submit')) {
document.getElementById('form_order_1_submit').onclick = function(e) {
e.preventDefault();
form_order_1_submit();
}
}
function form_order_2_submit() {
var name = $('#form_order_2 [name=name]').val();
var phone = $('#form_order_2 [name=phone]').val();
var email = $('#form_order_2 [name=email]').val();
var order = "";
order += "<b>Выбрано:</b><br>Ковшовые погрузчики<br>";
var weight = $('#scoop_weight [aria-valuetext]').attr('aria-valuetext');
var height = $('#scoop_height [aria-valuetext]').attr('aria-valuetext');
order += "<b>Вес грузов, (тонн):</b> " + weight + "<br>";
order += "<b>Максимальная высота подъема, (м):</b> " + height + "<br>";
console.log(order);
console.log(name + " " + phone);
var regexp = /^\+7\s\(\d{3}\)\s\d{3}-\d{4}$/;
var result = regexp.test(phone);
if (result) {
$.ajax({
url: "/mail.php",
type: "post",
data: {
name: name,
phone: phone,
email: email,
order: order,
},
success: function() {
ym(90805103, 'reachGoal', 'zayvka');
alert("Заявка успешно отпрвлена!");
}
});
}
}
if (document.getElementById('form_order_2_submit')) {
document.getElementById('form_order_2_submit').onclick = function(e) {
e.preventDefault();
form_order_2_submit();
}
}
$(document).ready(function() {
$('[name = "phone"]').mask("+7 (999) 999-9999", {
placeholder: "_",
autoclear: false,
});
});
</script>
</body>
</html>