Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/03/2015, 10:07
PHPeros
Colaborador
 
Fecha de Ingreso: septiembre-2013
Ubicación: España
Mensajes: 3.648
Antigüedad: 10 años, 7 meses
Puntos: 578
Respuesta: Deshabilitar botón al hacer cambio en el input text

¿La condición debería ser mayor que 0 no?

Código Javascript:
Ver original
  1. $("#nombre, #apellido").on('change',function() {
  2.     if($(this).val().length > 0)
  3.     {
  4.         $('#editar').removeClass('disabled');
  5.     }else{
  6.         $('#editar').addClass('disabled');
  7.     }
  8. });