Closing a Lightbox automatically scrolls up to the top of the page

Hi,

I have a button in the middle of the page that opens a lightbox when it’s clicked. Every time I close the lightbox, it automatically scrolls up to the top of the page. My client does not want this, how do I make the page to stay at the same area when the lightbox is closed? I have read this discussion and implemented the code but it didn’t work for me. Any solutions?

Can you share the code that’s not working?