You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a library for the frond-end developer to add function: when the window scroll down to the position where users can't see the specific element, the specific element will locate to the specified location (And developer can set the position, sure!)
Then, if users doesn't like the position we provide, users can drag the element to where they want.
Actually, I have to thanks to this article, which guide me to finish this function and motivate me to package it as a library.
// params:// box: the id name of element which you want to locate// anchor : the id name of parenet element of the element you want to locate autoPosition("box","anchor")
// Provide four params now, to set the position after user scroll downvarattribute={top: "20px",left: "100px",width: "200px",height: "200px"}autoPosition("box","anchor",attribute)