input:text + textarea-selector in jquery

Ich versuche, dies zu tun:

$('input:text','textarea').focus(function () {
$(this).removeClass('wrong');
if (this.value == this.defaultValue){
$(this).val('');
}

Aber $('input:text','textarea') nicht funktioniert wie ein Wahlschalter. Was mache ich falsch?

InformationsquelleAutor Hakan | 2012-01-20
Schreibe einen Kommentar