window.onload = function () { const scrollingTextContainer = document.querySelector( ".uc-header-scrolling-text .tn-atom" ); const scrollingText = scrollingTextContainer.innerHTML; scrollingTextContainer.innerHTML += scrollingText; }; // accordion // $(document).ready(function () { // $(function () { // let liter = "a"; //Литера для сборки // let oneAcc = false; // Открывать по одной вкладке false - true // let accOpen = false; // Открытая вкладка false - true // let openNum = 3; // Номер открытой вкладки // let scroll = true; // Скролл к открытой вкладке false - true // $('div[class*="uc-accord-' + liter + '"]').each(function (index) { // $(".uc-accord-" + liter + "-" + index + ":first") // .addClass("title-accord") // .attr("data-accord-index", index); // $(".uc-accord-" + liter + "-" + index + "") // .not(":first") // .addClass("content-accord hide-accord"); // }); // if (accOpen) { // $('div[class*="uc-accord-' + liter + "-" + openNum + '"]').addClass( // "active-accord" // ); // $( // 'div.content-accord[class*="uc-accord-' + liter + "-" + openNum + '"]' // ).removeClass("hide-accord"); // } // setTimeout(function () { // $(".content-accord").addClass("time-step"); // }, 1500); // function videoStop() { // setTimeout(function () { // $( // 'div.content-accord.hide-accord[class*="uc-accord-' + liter + '-"]' // ).each(function () { // let videoNum = $(this).find('div[data-elem-type="video"]').length; // if (videoNum) { // $(this) // .find('div[data-elem-type="video"]') // .each(function () { // $(this) // .find("iframe") // .attr("src", function (i, val) { // return val; // }); // }); // } // }); // }, 300); // } // $('div[class*="uc-accord-' + liter + '"]') // .find(".accord") // .click(function (e) { // let cT = $(this).closest(".title-accord"); // let ind = cT.attr("data-accord-index"); // if (oneAcc) { // //По одной вкладке // if (cT.hasClass("active-accord")) { // cT.removeClass("active-accord"); // $( // "div.content-accord.uc-accord-" + liter + "-" + ind + "" // ).toggleClass("hide-accord"); // videoStop(); // } else { // $('div.title-accord[class*="uc-accord-' + liter + '"]').removeClass( // "active-accord" // ); // cT.addClass("active-accord"); // $('div.content-accord[class*="uc-accord-' + liter + '-"]').addClass( // "hide-accord" // ); // $( // "div.content-accord.uc-accord-" + liter + "-" + ind + "" // ).removeClass("hide-accord"); // videoStop(); // } // } else { // //По несколько вкладок // cT.toggleClass("active-accord"); // $( // "div.content-accord.uc-accord-" + liter + "-" + ind + "" // ).toggleClass("hide-accord"); // videoStop(); // } // if (scroll) { // //скролл до вкладки // let el = $(this).closest(".r"); // setTimeout(function () { // $("html, body").animate({ scrollTop: el.offset().top - 50 }, 400); // }, 600); // } // }); // }); // }); // v2 $(document).ready(function () { $(function () { let liter = "a"; //Литера для сборки let oneAcc = false; // Открывать по одной вкладке false - true let accOpen = false; // Открытая вкладка false - true let openNum = 3; // Номер открытой вкладки let scroll = true; // Скролл к открытой вкладке false - true $('div[class*="uc-accord-' + liter + '"]').each(function (index) { $(".uc-accord-" + liter + "-" + index + ":first") .addClass("title-accord") .attr("data-accord-index", index); $(".uc-accord-" + liter + "-" + index + "") .not(":first") .addClass("content-accord hide-accord"); }); if (accOpen) { $('div[class*="uc-accord-' + liter + "-" + openNum + '"]').addClass( "active-accord" ); $( 'div.content-accord[class*="uc-accord-' + liter + "-" + openNum + '"]' ).removeClass("hide-accord"); } setTimeout(function () { $(".content-accord").addClass("time-step"); }, 1500); function videoStop() { setTimeout(function () { $( 'div.content-accord.hide-accord[class*="uc-accord-' + liter + '-"]' ).each(function () { let videoNum = $(this).find('div[data-elem-type="video"]').length; if (videoNum) { $(this) .find('div[data-elem-type="video"]') .each(function () { $(this) .find("iframe") .attr("src", function (i, val) { return val; }); }); } }); }, 300); } $('div[class*="uc-accord-' + liter + '"]') .find(".accord") .click(function (e) { let cT = $(this).closest(".title-accord"); let ind = cT.attr("data-accord-index"); if (oneAcc) { //По одной вкладке if (cT.hasClass("active-accord")) { cT.removeClass("active-accord"); $("div.content-accord.uc-accord-" + liter + "-" + ind).each( function () { $(this).toggleClass("hide-accord"); } ); videoStop(); } else { $('div.title-accord[class*="uc-accord-' + liter + '"]').removeClass( "active-accord" ); cT.addClass("active-accord"); $('div.content-accord[class*="uc-accord-' + liter + '-"]').addClass( "hide-accord" ); $("div.content-accord.uc-accord-" + liter + "-" + ind).each( function () { $(this).removeClass("hide-accord"); } ); videoStop(); } } else { //По несколько вкладок cT.toggleClass("active-accord"); $("div.content-accord.uc-accord-" + liter + "-" + ind).each( function () { $(this).toggleClass("hide-accord"); } ); videoStop(); } if (scroll) { //скролл до вкладки let el = $(this).closest(".r"); setTimeout(function () { $("html, body").animate({ scrollTop: el.offset().top - 50 }, 400); }, 600); } }); }); }); // end. accordion // tabs // // let blocks1 = ["#rec757873186", "#rec757878064"]; // let buttons1 = document.querySelectorAll('div[class*="tabbtn1"]'); // function show1(e) { // blocks1.forEach((element) => { // $(element).removeClass("v-activetab"); // }); // buttons1.forEach((element) => { // $(element).removeClass("v-activebtn1"); // }); // $(".tabbtn1-" + e.attributes.num.value).addClass("v-activebtn1"); // document // .querySelector(blocks1[parseFloat(e.attributes.num.value) - 1]) // .classList.add("v-activetab"); // if (typeof t_lazyload_update !== "undefined") t_lazyload_update(); // } // $(document).ready(function () { // setTimeout(() => { // blocks1.forEach(function (element) { // $(element).css("display", "none"); // }); // buttons1.forEach((element) => { // element.setAttribute("num", element.classList[2].split("-")[1]); // if (parseFloat(element.classList[2].split("-")[1]) === 1) { // element.classList.add("v-activebtn1"); // } // element.setAttribute("onclick", "show1(this)"); // }); // document.querySelector(".tabbtn1-1").click(); // if (window.location.hash && window.location.hash.indexOf("/tab/") === -1) // $('[class*="tabbtn"] a[href="' + window.location.hash + '"]').click(); // }, 500); // }); // end. tabs