2012-01-20 19 views
9

estoy tratando de hacer esto:de entrada: Texto + selector de área de texto en jQuery

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

Pero $('input:text','textarea') no funcionará como un selector. ¿Qué estoy haciendo mal?

Respuesta

18

Probar $('input:text, textarea')

+0

Funciona, gracias Paul. – Hakan

Cuestiones relacionadas