0.0.160 routes
This commit is contained in:
@@ -10,7 +10,7 @@ $(document).ready(function() {
|
||||
el: $(".b_filter_routes")[0],
|
||||
recover_el_view: true,
|
||||
ghost_block:{name: 'route_filters'},
|
||||
$unnatach_bottom_el: $("footer")[0]
|
||||
$unnatach_bottom_el: $(".b_dont_found_anth")[0]
|
||||
})
|
||||
_scroll.init()
|
||||
$('body')[0].onscroll = function() {
|
||||
|
||||
@@ -14,7 +14,8 @@ class scroll{
|
||||
}
|
||||
|
||||
attachElementWhenScroll(){
|
||||
if (!this.attached_by_bottom_el && this.$unnatach_bottom_el && this.$unnatach_bottom_el.getBoundingClientRect().top <= window.innerHeight && this.attached){
|
||||
let bottom_el_in_screen = this.$unnatach_bottom_el.getBoundingClientRect().top <= window.innerHeight
|
||||
if (!this.attached_by_bottom_el && this.$unnatach_bottom_el && bottom_el_in_screen && this.attached){
|
||||
let $unnatach_bottom_el_margin_top= window.getComputedStyle(this.$unnatach_bottom_el)
|
||||
$unnatach_bottom_el_margin_top = $unnatach_bottom_el_margin_top.getPropertyValue('margin-top');
|
||||
$unnatach_bottom_el_margin_top = $unnatach_bottom_el_margin_top.split('p')
|
||||
@@ -26,7 +27,7 @@ class scroll{
|
||||
} else if (this.attached_by_bottom_el && this.$unnatach_bottom_el && this.$unnatach_bottom_el.getBoundingClientRect().top >= window.innerHeight) {
|
||||
this.attachFunc(false)
|
||||
}
|
||||
if (!this.attached && this.$el.getBoundingClientRect().top <= this.attach_top) {
|
||||
if (!this.attached && this.$el.getBoundingClientRect().top <= this.attach_top && !bottom_el_in_screen) {
|
||||
this.attachFunc()
|
||||
} else if ((this.$el.parentElement.getBoundingClientRect().top - this.attach_top) > 0){
|
||||
this.$el.style.position = "unset";
|
||||
|
||||
Reference in New Issue
Block a user