SOLDIER-OF-FORTUNE
SOLDIER-OF-FORTUNE

Reputation: 1654

remove a string using jquery or css

I have some html:

    <span class="variantprice"><span class="pricelabel">
Preis&nbsp;</span>€ 240,00 (CHF)</span>

Whats the best way to remove the (CHF) using jquery? OR even CSS???

Upvotes: 0

Views: 50

Answers (1)

Curtis
Curtis

Reputation: 103348

Using jQuery:

    $(".variantprice").html(function(){
        return $(this).html().replace(" (CHF)", ""); 
    });

See Demo: http://jsfiddle.net/AYZEs/

Upvotes: 2

Related Questions