<?foreach ($arResult["PROPERTIES"] as $arProp):?>
<?if(!empty($arProp["VALUE"])):?>
<table id="table1">
<tr>
<td style = "padding: 10px;" ><span><?=$arProp["NAME"]?></span> </td>
<td style = "text-align: right !important; " ><span>
<?if(!is_array($arProp["VALUE"])):?>
<?=$arProp["VALUE"]?>
<?else:?>
<?foreach($arProp["VALUE"] as $arPropItem):?>
<?=$arPropItem?>;
<?endforeach?>
<?endif?>
</span></td>
</tr>
</table>
<?endif?>
$(document).ready(function(){
var tr = document.getElementById('table1').getElementsByTagName('tr'),
i = tr.length;
while(i--) {
tr[i].style.backgroundColor = i%2 ? ' green' : 'white';
}
})
$(document).ready(function(){
var tr = document.querySelectorAll('.table tr'),
i = tr.length;
while(i--) {
tr[i].style.backgroundColor = i%2 ? ' green' : 'white';
}
})
<?foreach ($arResult["PROPERTIES"] as $i => $arProp):?>
<?if(!empty($arProp["VALUE"])):?>
<table id="table1">
<tr style="background-color:"<?= $i%2 ? 'green' : 'white' ?>">
// ...
#table1 tr:nth-child(even) { background: #0f0; }
#table1 tr:nth-child(odd) { background: #fff; }