jQuery - How to scroll an anchor to the top of the page when clicked?

前端 未结 3 523
栀梦
栀梦 2021-01-06 14:39

I have a list of links in div elements and I am using dropcontent.js to load content into another div when a link is clicked. I would now like to a

3条回答
  •  醉酒成梦
    2021-01-06 15:16

    This answered question linked below is closely related and good info for all people that like to be able to

    • scroll the page to a certain element, div id

    • have that element scroll to the the top of the page by clicking an anchor from that element

    • have that element scroll to the the top of the page by clicking the actual div id containing all the anchor links; "click catcher div"

    Scroll element to top of page by clicking anchor inside element or anywhere inside containing div id

提交回复
热议问题