I have such a need, and I don’t have any ideas. Let me see if any friends can provide it:
Background:
An H5 list page. The list content is stores one by one. This page is long. When you click on one of the stores, you will jump (window.document.href=store url) to the store's detailed page. Click return (browser return) again to return to this list page.
Requirement:
Can it be possible to scroll to a certain store, click to display the detail page and then return to this position, instead of returning to the top again.
I thought about using anchor points, but anchor points only allow users to locate a specific location through the URL. There are no other ideas, so I would like to ask everyone for help. Thank you.
给我你的怀抱2017-05-19 10:16:26
You can get the value of scrollTop() before jumping and save it. When returning, set scrollTop() to this value
http://www.w3school.com.cn/ti...
Official demo: