Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

29
Views
How to get the user back to the exact same place after reloading the page

I have a card elements on my website. The card has a custom length containing various sized photos and comments and there is a submit button at the bottom.The whole thing looks like this:

enter image description here

There is a problem of the user returning to the same place after reloading the page (after press button submit). If it sends it to a specific ID, it might look like it has come back elsewhere. Below is another card, above is another one. Is there any simple way of using JS or jQuery to get the user back to the same place (exactly the same)? For example by saving down its height from the top and loading it when the user comes back for responses from the server?

The HTML code looks like this:

<!-- loop for card in cards -->
<div class="card" id="{{ card.id }}">
  <img id="img">
  <div id="comments"></div>
  <form method="POST">
    {% csrf_token %}
    <button type="submit">I Like this topic</button>
  </form>
</div>
7 months ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.