(function () { function takevalues(e, c) { return "checkbox" == $(e + ' [name="' + c + '"]').attr("type") ? $(e + ' [name="' + c + '"]:checked').val() : $(e + ' [name="' + c + '"]').hasClass("t-radio") ? $(e + ' [name="' + c + '"]:checked').val() : $(e + ' [name="' + c + '"]').hasClass("t-checkbox") ? $(e + ' [name="' + c + '"]:checked').val() : $(e + ' [name="' + c + '"]').hasClass("t-img-select") ? $(e + ' [name="' + c + '"]:checked').val() : $(e + ' [name="' + c + '"]').val() } $(document).ready(function () { var e = [], c = [], n = []; let myfrom = function ($form) { if (0 == $("#rec652248267 .t706").length) for (let a = 0; a < e.length; a++) if (takevalues("#rec652248267", e[a]) == c[a]) { if ("#" == n[a].charAt(0)) { if (0 == $('[href="' + n[a] + '"]').length) { var o = ''; $(o).insertBefore("#rec652248267 form") } let newLink = document.createElement('a'); newLink.setAttribute('href', n[a]); newLink.style.display = "none"; let block = document.querySelector('#rec652248267'); block.append(newLink); newLink.click(); let elem = document.querySelector('#rec652248267'); if (elem.getAttribute("data-record-type") == "702" || elem.getAttribute("data-record-type") == "316" || elem.getAttribute("data-record-type") == "390" || elem.getAttribute("data-record-type") == "756") { elem.style.opacity = 0; let int = setInterval(function () { let popupOpen = document.querySelector(".t-popup_show"); if (!popupOpen) { clearInterval(int); elem.style.opacity = 1; } }, 50); } $('[href="' + n[a] + '"]').click(), setTimeout(function () { $(".t-form-success-popup").hide(); $("body").removeClass("t-body_success-popup-showed"); }, 0); break } window.location.href = n[a]; break } }; if (typeof window.NinjaSuccessFunctiondimalim == 'undefined') { window.NinjaSuccessFunctiondimalim = []; window.NinjaSuccessFunctiondimalim[0] = myfrom } else { window.NinjaSuccessFunctiondimalim.push(myfrom) }; window.mySuccessFunctiondimalim = function ($form) { for (var i = 0; i < window.NinjaSuccessFunctiondimalim.length; i++) { window.NinjaSuccessFunctiondimalim[i]($form) } }; }); $(document).ready(function () { setInterval(function () { var forms = document.querySelectorAll("#rec652248267 form"); forms.forEach(function (form) { if (form.getAttribute("formSuccess") !== "1") { form.setAttribute("formSuccess", "1"); form.addEventListener('tildaform:aftersuccess', function () { window.mySuccessFunctiondimalim(); }); } }); }, 1000); }); })()
Made on
Tilda