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

290
Visualizações
Making a replying form to appear on the exact clicked comment to reply to

Am working on a blog site. In the blog details, I have a comments section where each comment can be replied to. This is how it looks: The outer one is the comment and inner one is the reply. Comments

I have used Javascript so when a user clicks on "Reply", the reply form appears below the comment like this: reply form

My problem is, whichever comment is clicked to reply to, the reply form always displays on the first comment. How can I make it appear on the exact clicked comment? Am using Django, and HTML, CSS & JS for frontend.

This is my Script:

    function classingFunction() {
      var element = document.getElementById("my-reply");
      if (element.classList.contains('my_reply')) {
        element.classList.remove("my_reply");
      }
      else if (element.classList.contains('my_reply') == false){
        element.classList.add("my_reply");
      }
    }

The my_reply class has {display:none;} for the form.

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