I came up in a scenario where i have floating button to identify. There is two buttons, Save and Cancel. When i am on top of the page buttons are like in a floating panel and once i scroll down and reach the bottom of the page then button will be fixed. So both cases i have two different identifier to identify the buttons. I am using the below code to scroll down.
My question is, when i scroll down, how to know i reached the end of the page or not? Because i cannot scroll like unlimited time right? once i reached the bottom of the page i can stop scrolling and check for the fixed button element.