0.0.136 scroll search route results
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user