treeInterest[i].checked ?
childCheckbox.forEach((elem) => (elem.checked = true)) :
childCheckbox.forEach((elem) => (elem.checked = false));
на treeInterest[i].checked ?
childCheckbox.forEach((elem) => {elem.checked = true; elem.indeterminate = false;}) :
childCheckbox.forEach((elem) => {elem.checked = false;elem.indeterminate = false;});
const renderResult = (result) => {
if (result.result === 0) {
alert("Not found");
} else {
currentItem.push(info);
render([info]);
update();
}
};
if (item < 0) {
alert("not render")
} else {
fetch(url, options)
.then((response) => response.json())
.then(renderResult)
}
const text = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus justo id metus fringilla, nec bibendum sem vulputate. Vivamus nec ex ut risus luctus tincidunt ac et lacus. Mauris molestie laoreet tortor non fermentum. Vestibulum tincidunt nulla quis feugiat pharetra. Donec non posuere purus. Donec mattis convallis augue, ut semper justo varius vel. Proin tristique dui ac elit tempor molestie. Nulla nec ultricies nunc.`;
const parts = text.split(/(?<=[.?!]\s)/);
parts.shift();parts.shift();
console.log( parts.join("") );
$(document).ready(function(){
$(".price_content").slideUp();
let $titleList = $(".price_title");
$titleList.click(function(){
$(this).next(".price_content").slideToggle("slow");
$(".price_content").not($(this).next(".price_content")).slideUp();
$titleList.removeClass('plus');
$(this).addClass('plus');
});
});
jQuery(function () {
let $ = jQuery;
$("a", $(".goroda")).each( function () {
let $this = $(this);
let path = window.location.pathname;
$this.attr("href", $this.attr("href") + path.substr(1) );
} );
})
<?
// это строчки - обычный набор для отдельной аяксовой страницы;
// тут исключен вывод шаблона сайта (хедера и футера), только рабочая область
define("NO_KEEP_STATISTIC", true);
define("NOT_CHECK_PERMISSIONS", true);
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");?>
// сюда закидывается вызов компонента списка новостей с исходной страницы
<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_after.php");
?>