1$(document).on('click', '.show_pop', function (e) { 2 e.preventDefault(); 3 4 var pop = $(this).attr('data-pop'); 5 6 var formData = new FormData(); 7 formData.append('id', pop); 8 9 $.ajax({ 10 type:'POST', 11 url:'/ajax/mcalc.php', 12 data:formData, 13 contentType: false, 14 processData: false, 15 success: function(response){ 16 $('body').append(response); 17 } 18 }) 19}) 20 21$(document).on('click', '.close_pop', function (e) { 22 e.preventDefault(); 23 24 var pop = $(this).closest('.pop'); 25 pop.remove(); 26}) 27 28$(function(){ 29 $("body").on("click", ".js--contacts-details-more-btn", function (e) { 30 e.preventDefault(); 31 32 const $t = $(this); 33 const $txtBlock = $("#details-more-txt"); 34 35 $t.toggleClass("_active"); 36 $txtBlock.toggleClass("_active"); 37 38 scrollToTargetIfNotInViewBox($txtBlock); 39 }); 40 41 function scrollToTargetIfNotInViewBox($target) { 42 const winST = $(window).scrollTop(); 43 const scrollPos = $target.offset().top; 44 45 if (winST > scrollPos) { 46 $("html, body").animate({ scrollTop: scrollPos }, 300); 47 } 48 } 49 50 // 51 // custom modals 52 // 53 54 let customModal = (function () { 55 $("body").on("click", ".custom-modal-bg", function (e) { 56 window.customModal.close(); 57 }); 58 59 $("body").on("click", ".js--custom-modal-close-btn", function (e) { 60 window.customModal.close(); 61 }); 62 63 $("body").on("click", ".js--custom-modal-toggler", function (e) { 64 window.customModal.close(); 65 window.customModal.open($(this).data("target")); 66 }); 67 68 function open(targetID) { 69 if (!$(".custom-modal-bg").length) { 70 $("body").append('<div class="custom-modal-bg"></div>'); 71 } 72 73 $(targetID).addClass("active"); 74 $("body").addClass("_custom-modal-opened"); 75 $(".custom-modal-bg").addClass("active"); 76 } 77 78 function close() { 79 $(".custom-modal").removeClass("active"); 80 $(".custom-modal-bg").removeClass("active"); 81 $("body").removeClass("_custom-modal-opened"); 82 } 83 84 return { 85 open: open, 86 close: close, 87 }; 88 })(); 89 90 window.customModal = customModal; 91 92 // ... end; 93}); 94$(function(){ 95 $('body').on('click', '.js--accordion-toggler', function(e){ 96 e.preventDefault(); 97 98 const $t = $(this); 99 const $list = $t.closest('.accordion-list'); 100 const $content = ( $t.data('target') ) ? $($t.data('target')) : $t.siblings('.accordion-content'); 101 const $allBtns = $list.find('.js--accordion-toggler'); 102 const $allContent = $list.find('.accordion-content'); 103 104 $allBtns.not($t).removeClass('active'); 105 $t.toggleClass('active'); 106 107 $allContent.not($content).slideUp(300, function(){ 108 $allContent.not($content).removeClass('active'); 109 }); 110 111 $content.stop(true, true).slideToggle(300, function(){ 112 $content.toggleClass('active'); 113 $list.trigger('accordion-change', {currentBtn: $t}); 114 }); 115 }); 116});
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.