1function showCallBackForm() { 2 3 var modalHtml = "<div class='modal-wrap'>"; 4 modalHtml += "<div class='modal-form'>"; 5 6 modalHtml += "<div class='modal-callback-header'>ÐеÑезвоним в ближайÑее вÑÐµÐ¼Ñ Ð¸ оÑвеÑим на ÐаÑи вопÑоÑÑ!</div>"; 7 8 modalHtml += "<div class='modal-callback-despcription'>ÐÐµÐ½ÐµÐ´Ð¶ÐµÑ Ð¿ÐµÑÐµÐ·Ð²Ð¾Ð½Ð¸Ñ Ð²Ð°Ð¼ в ближайÑее вÑемÑ</div>"; 9 10 modalHtml += "<div class='modal-img-wrap'><img src='https://avtodom.by/assets/images/callback.jpg'></div>" 11 12 13 modalHtml += "<div class='modal-form-wrap'><div class='modal-form-input-phone'>+375<input type='phone' placeholder='xx xxx-xx-xx' maxlength='9'></div><button class='modal-form-button'>ÐÐУ ÐÐÐÐÐÐ!</button></div>" 14 15 modalHtml += '</div>'; 16 modalHtml += "</div>"; 17 18 19 $( "body" ).append(modalHtml); 20 21 22 $('.modal-wrap').off('click'); 23 $('.modal-wrap').on('click', function() { 24 $('.modal-wrap').remove(); 25 }); 26 27 $('.modal-form').on('click', function() { 28 return false; 29 }); 30 31 $(".modal-form-input-phone input").keypress(function (e){ 32 var charCode = (e.which) ? e.which : e.keyCode; 33 if (charCode > 31 && (charCode < 48 || charCode > 57)) { 34 return false; 35 } 36 }); 37 38 39 $('.modal-form-button').off('click'); 40 $('.modal-form-button').on('click', function() { 41 var phone = "+375"+$('.modal-form-input-phone input').val(); 42 if (phone.length != 13) { 43 alert("Ðе веÑно Ñказан ÑелеÑон"); 44 return 45 } 46 47 if (sending == true) { 48 return; 49 } 50 51 var sending = true; 52 53 $.ajax({ 54 url: '/api/leads', 55 type: 'POST', 56 data: JSON.stringify({ 57 phone: phone, type: "call", name: "None" 58 }), 59 contentType: 'application/json; charset=utf-8', 60 dataType: 'json', 61 async: false, 62 success: function(msg) { 63 alert("ÐапÑÐ¾Ñ Ð¾ÑпÑавлен. ÐÑ ÑвÑжемÑÑ Ñ Ð²Ð°Ð¼Ð¸ в ближайÑее вÑемÑ!"); 64 sending = false 65 } 66 }); 67 }); 68 69} 70 71$(document).ready(function() { 72 73 $('.ph_zacaz').on('click', function() { 74 showCallBackForm(); 75 }) 76 77 $('.btn_zacaz').on('click', function() { 78 showCallBackForm(); 79 }); 80}); 81
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.