Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

281
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!