0

Ich hole mit jQuery Elemente:

$("div:.status");

nun möchte ich in allen Treffern einen Substring ersetzen... z.B. "foo" gegen "bar". Wie ginge das?

flag

1 Answer

2

$("div:.status").each(
    function(){
        var neu=this.text();
        neu.replace(/foo/g, "bar");
        this.text(neu);
    }
);
link|flag

Your Answer

Get an OpenID
or

Not the answer you're looking for? Browse other questions tagged or ask your own question.