Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

231
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda