<!-- meloddy.design - Вставка префикса "от " к цене в блоки магазина -->
<script>
document.addEventListener('DOMContentLoaded',()=>{
setTimeout(()=>{
const margin = '5px'; // Парметр отвечающий за отступ префикса 'от' от цены
document.querySelectorAll('.t778__price').forEach(e=>{
const p=document.createElement('span');
const s=window.getComputedStyle(e);
p.style.cssText=`
display:inline-block;
vertical-align:middle;
margin-right:${margin};
font-family:${s.fontFamily};
font-size:${s.fontSize};
font-weight:${s.fontWeight};
color:${s.color};
line-height:${s.lineHeight};
text-transform:${s.textTransform};
letter-spacing:${s.letterSpacing}
`;
p.textContent='от ';
e.insertAdjacentElement('beforebegin',p)
})
},200)
})
<script>
document.addEventListener('DOMContentLoaded',()=>{
setTimeout(()=>{
const margin = '5px'; // Парметр отвечающий за отступ префикса 'от' от цены
document.querySelectorAll('.t778__price').forEach(e=>{
const p=document.createElement('span');
const s=window.getComputedStyle(e);
p.style.cssText=`
display:inline-block;
vertical-align:middle;
margin-right:${margin};
font-family:${s.fontFamily};
font-size:${s.fontSize};
font-weight:${s.fontWeight};
color:${s.color};
line-height:${s.lineHeight};
text-transform:${s.textTransform};
letter-spacing:${s.letterSpacing}
`;
p.textContent='от ';
e.insertAdjacentElement('beforebegin',p)
})
},200)
})
<!-- meloddy.design - Вставка префикса "от " к цене в блоки магазина -->
document.addEventListener('DOMContentLoaded',()=>{
setTimeout(()=>{
const margin = '5px'; // Парметр отвечающий за отступ префикса 'от' от цены
document.querySelectorAll('.t778__price').forEach(e=>{
const p=document.createElement('span');
const s=window.getComputedStyle(e);
p.style.cssText=`
display:inline-block;
vertical-align:middle;
margin-right:${margin};
font-family:${s.fontFamily};
font-size:${s.fontSize};
font-weight:${s.fontWeight};
color:${s.color};
line-height:${s.lineHeight};
text-transform:${s.textTransform};
letter-spacing:${s.letterSpacing}
`;
p.textContent='от ';
e.insertAdjacentElement('beforebegin',p)
})
},200)
})