Reputation: 63
How to select the price value (here 79,90) within a span tag ?
<span name="data_udpade_minicard">2\ article(s)<br>79,90 €</span>
<br>
?I tried by stripping out the beggining with Regex:
$('span').text().replace(/.*article\(s\)/,"");
the result is
"2 79,90 €"
Upvotes: 0
Views: 103
Reputation: 875
Try this
var b =$($("span").children('br').get(0).nextSibling);
alert(b.text());
Upvotes: 1