0

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???

2
  • i don't think using span inside span is valid for html standarts, correct me if i am wrong? Commented Aug 16, 2012 at 10:59
  • A span is an in-line element, and can be contained by either block-level, or in-line, elements. Commented Aug 16, 2012 at 11:00

1 Answer 1

2

Using jQuery:

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

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.