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

288
Vistas
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 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