Animate scrollTop scrolls up and down and doesn't settle

Discussion in 'JavaScript' started by wallmachine, Mar 14, 2020.

  1. #1
    When you click on .main-accordion-tab or .sub-accordion-tab it will just go passed the top of the page and back down multiple times and then sometimes not.

    What should happen:
    • Click .main-accordion-tab which activates scroll to the top of the page with the clicked .main-accordion-tab displaying at the top of page leaving a top margin of 9px, this then opens up and you get one or more .sub-accordion-tab to click on
    • Click .sub-accordion-tab which activates scroll to the top of the page with the clicked .sub-accordion-tab displaying at the top of page leaving a top margin of 9px
    example: h ttps://mega.nz/#!c0w02SCA!nSJSkI4b1jyiDYvsYyEhUNgMV-wbN2ZIjrGsS9A3wy4
     
    Last edited: Mar 15, 2020
    wallmachine, Mar 14, 2020 IP