Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

232
Vistas
jquery .addclass and remove class is not working

on my code i have a button and if the user clicks the button i try to change a timer which displays on ui by 20 minutes

this was my ui code

enter image description here

this was the function where the user clicks the button then it will get called and following lines get executed

$('input[name$="timer[1]"').addClass('increaseTimer').removeClass('inputTimer');

The class name gets changed while clicking the button, but the timer is not getting increased

the UI shows the time of input timer class

Increase timer code:


$(".increaseTimer").datetimepicker({

  ignoreReadonly:true,

  format: 'LT',

  defaultDate: genDate()+' 00:20'

});

Input timer code:

$(".inputTimer").datetimepicker({

  ignoreReadonly:true,

  format: 'LT',

  defaultDate: genDate()+' 00:00'

});

the increase timer is working only if the input timer is not used in UI itself, at that time the increase timer is applying while clicking the button

the remove class is applied , but the UI shows the timer and it not get removed from UI

What wrong in my code

please helpme out

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda