export function initMarkupTrustProps() { const renderSearchLink = (trustPropName, trustPropType) => { const safeName = trustPropName.replace(' ', '+'); return` найти`; } $('.trust-props input[type="checkbox"]').click((e) => { if (e.target.checked) { $(e.target).parent().find('a').remove(); } else { const $parent = $(e.target).parent(); const $listContainer = $parent.parents("div.render-content"); const trustPropType = $listContainer.attr("data-trust-prop-type"); const renderedSearchLink = renderSearchLink($parent.text(), trustPropType); $parent.append(renderedSearchLink); } }); }