Christof Donat wrote:
Hi,

I'd like:

$('.whatever').text(); // => ["foo", "bar", "baz"]

$('.whatever').text(','); // => "foo,bar,baz"

But at the moment $('.whatever').text(','); would set the text in all elements to ','. I don't think we should change that behaviour because it is the more complicated to simulate:

$('.whatever').text().join(',');

vs

$('.whatever').each(function() {
        this.innerHtml = ',';
});

Christof


Ah, sure, I totally forgot about that!


--Klaus

Reply via email to