Last active
January 16, 2019 00:00
-
-
Save hefhuman/c8fad2dba39fbd4a5d0d7bd683e80fc2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--to check offset--> | |
<span class="scrolls"></span> | |
<div class="btm_plax_holder"> | |
<div id="bottom2"> | |
<div class="wrapper"> | |
<div class="btm2_con"> | |
<?php dynamic_sidebar('btm2_box1'); ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<script> | |
$('.scrolls').css({'position' : 'fixed', 'top' : '50px', 'left' : '0' , 'z-index' : '999999'}); | |
$('.scrolls').text(window.scrollY); | |
if(window_width > 1000){ | |
if(window.scrollY >= 2582){ | |
$('#bottom2').css({'position':'fixed','left' : '0', 'top' : '190px', 'width' : '100%'}); | |
}else{ | |
$('#bottom2').css('position','static'); | |
} | |
}else if(window_width <= 1000 && window_width > 800){ | |
if(window.scrollY >= 3508){ | |
$('#bottom2').css({'position':'fixed','left' : '0', 'top' : '0', 'width' : '100%'}); | |
}else{ | |
$('#bottom2').css('position','static'); | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment