0.0.136 scroll search route results

This commit is contained in:
SBD
2025-01-28 15:10:45 +03:00
parent b825504063
commit 0407cadd50
2 changed files with 6 additions and 14 deletions

View File

@@ -1,16 +1,3 @@
function attachElementWhenScroll(el, options){
let attach_top = options.attach_top;
let top = options.top;
let left = options.left;
if (el.getBoundingClientRect().top <= attach_top){
el.style.top = top + 'px';
el.style.position = "fixed";
} else if (el.getBoundingClientRect().top >= attach_top){
el.style.position = "unset";
}
}
class scroll{
constructor(props){
this.attach_top = props.attach_top;