Hello everyone,
first, I know there is several topics about Sticky function on Laytheme.
I've been looking for a solutions through them, but every topics takes end with the same conclusion : It doesnt work yet, and the LayTheme developer are working on a lay option.
So, I'm trying hard on it, and what I've found is this script :
<script>
jQuery (document).ready(function() {
var stickyTop = jQuery ('.sticky').offset().top;
jQuery (window).scroll(function() {
var windowTop = jQuery (window).scrollTop();
if (stickyTop < windowTop) {
jQuery ('.sticky').css('position', 'fixed');
} else {
jQuery ('.sticky').css('position', 'relative');
}
});
});
</script>
then, I understood that maybe the "sticky" function doesnt work because of the overflow, so i've added this :
#grid {
overflow : auto !important;
}
As it doesnt make any difference, I've tried to inherite / unset the overflow, and even to apply this to the grid-inner and to the html (I don't know if it makes sens but anyway, it doesnt change anything as well...)
Nonetheless, i've noticed that something is happening with my sticky element : when I scroll down, it disappears in a strange way
I let you check that : http://www.borders.digital/25-2-2
It makes me think that something could work.
As I'm still a novice, I'm asking for help,
Does anyone understand better than me what is going on ?
What could I change ?
And if any Lay Developer come here : Is a Sticky option will be released in a near future ?
Thank you for reading !