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

72
Views
Back to previous page same scroll position with lazy load images on page using debounce

Working on scroll position when user goes back to the previous page then same scroll position of the product will show. Here i have lazy load images ajax is triggers multiple times. How can we use debounce script. I have tried like this

 $('.test').on('click', function(e){

    stateData = {
        path: window.location.href,
        scrollTop: $(window).scrollTop()
    };
    const url = new URL(window.location);
    window.history.replaceState(stateData, '', url);
    stateData = {
        path: window.location.href,
        scrollTop: 0
    };
    window.history.pushState(stateData, '', url);
    e.preventDefault();
});

Can anyone suggest to me how to handle it?

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!