javascript - H5 page positioning problem
高洛峰
高洛峰 2017-05-19 10:14:26
0
3
487

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.

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(3)
我想大声告诉你

Save scrollTop to localStorage when jumping

给我你的怀抱

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:

伊谢尔伦

Thank you. But I don’t plan to use jq for the time being.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template