Wednesday, 21 August 2013

How to select a text node on jquery without selecting the sibiling

How to select a text node on jquery without selecting the sibiling

I have some HTML that is structured like this:
<div class="ProductPriceRating">
<em>
<strike class="RetailPriceValue">$65.00</strike>
$45.00
</em>
</div>
I need to select the "$45.00". I thought this would work:
$('.ProductPriceRating strike').siblings().css('background','red');
But it didn't

No comments:

Post a Comment