JSFiddle - React, Tailwind, and code Playground

by oceog

HTML

<div class="popup" id="zvonok" style="display: block;">
     <h3>Форма заказа звонка <span>Заполните поля для отправки</span></h3>
	<a href="#" class="close">×</a> 
    <form action="" class="popup_form" method="post">
        <input type="hidden" name="send" value="Y">
        <input type="hidden" name="type" value="SEND_CALL">
        <div class="form_input">
            <label>Ваше имя</label>
            <input type="text" name="form[NAME]" />
            <label>Номер телефона</label>
            <input type="text" name="form[PHONE]" />
            <label>Электронная почта</label>
            <input type="text" name="form[EMAIL]" />
            <label>Кратко о вопросе</label>
            <input type="text" name="form[QUEST]" />
            <label>Время для звонка</label>
            <input type="text" name="form[TIME]" />
        </div>
        <label class="anti_spam">Я не робот*:
            <input type="checkbox" id="robot1" name="robot" value="1"
            validate="checkbox_not_empty" />
        </label>
        <div class="reminder" style="font-size: 11px; line-height: 1; color: rgb(85,85,85);">включите перед отправкой</div>
        <div>
            <p class="inputs_error"></p>
            <input type="submit" class="btn" value="Заказать звонок" />
        </div>
    </form>
</div>

CSS

.popup {
    display: none;
    background: #f7f8f9;
    width: 360px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -220px 0 0 -180px;
    padding: 15px;
    z-index: 5001;
    border-radius: 10px;
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
}
.popup h3 {
    font-size: 14px;
    color: #212121;
    font-weight: normal;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.popup .close {
    font-size: 16px;
    color: #003356;
    text-decoration: none;
    display: block;
    width: 14px;
    height: 14px;
    position: absolute;
    right: 5px;
    top: 5px;
}
.popup_form {
    overflow: hidden;
    padding-bottom: 10px;
}
.form_input, form_send_mail {
    overflow: hidden;
}
.popup_form label {
    width: 120px;
    height: 25px;
    line-height: 25px;
    float: left;
    margin-right: 10px;
    clear: both;
    text-align: right;
    font-size: 12px;
}
.popup_form input[type="text"] {
    width: 200px;
    float: left;
    margin-bottom: 10px;
}
input[type="text"], input[type="password"] {
    width: 150px;
    height: 23px;
    line-height: 23px;
    padding: 0 10px;
    background: #fff url(../images/inp.png) repeat-x 0 0;
    box-shadow: 2px 2px #eaecee;
    -moz-box-shadow: 2px 2px #eaecee;
    -webkit-box-shadow: 0 0 5px #ccc;
    border: 1px solid #c3c4c4;
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
}
.anti_spam {
    margin-left: 18px;
    float: left;
}
.anti_spam input {
    position: relative;
    top: 2px;
    left: 4px;
}
.reminder {
    font-size: 11px;
    line-height: 1;
    color: rgb(85, 85, 85);
    position: relative;
    top: 7px;
    overflow: hidden;
    float: left;
}
.popup_form .btn {
    margin-left: 130px;
    height: 32px;
    font-size: 14px;
}
input[type="button"], input[type="submit"], button {
    cursor: pointer;
}
.btn {
    background: url(../images/btn.png) repeat-x 0 0;
    font-size: 18px;
    color: #fff;
   ...

JavaScript

$(document).ready(function () {
    $('.popup_form').submit(function () {
        var $frm = $(this),
            $btn = $frm.find('.btn');
        if (!$frm.find("#robot1").is(":checked")) {
            $btn.prev().text('Подтвердите, что Вы не робот.').fadeIn(100).delay(1000).fadeOut(100);
            return false;
        }
        return true;
    });
});