スパンクラスが「price-red」の div「price」に грн テキストがあります
<div class="price">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="190"><span class="price-text">Цена для вас:</span></td>
<td></td>
<td></td>
</tr>
<tr><td colspan="3" height="10"></td></tr>
<tr>
<td><nobr><span class="price-red"><b>299 грн.</b></span></nobr></td>
<td></td>
<td></td>
</tr>
</table>
</div>
CSS
.price-red{
font-family: Arial, Helvetica, sans-serif;
font-size: 60px;
text-transform: none;
}
jqueryで見つけて、「грн」のフォントを60pxから40pxに変更する必要があるので、これを試しました:
<script>
$(document).ready(function(){
$('span.price-red:contains("грн")').css('font-size', '40px');
});
</script>
テキスト299 ポンド。次のようにphpによって生成されます。
<td><?php if (!empty($special)){ ?><span class="price-red">Sale!</span><?php }else{ ?><nobr><span class="price-red"><b><?php echo $price; ?></b></span></nobr><?php } ?></td>
<td><?php if (!empty($special)){ ?><span class="price-red"><b><?php echo $special; ?></b></span><?php } ?></td>
<td></td>
</tr>
答え
$(document).ready(function(){
$('span.price-red:contains("грн")').html(function () {
return this.innerHTML.replace("грн", "<span style='font-size:40px'>грн</span>")
});
});