Not sure why this code would not work
jQuery(document).ready(function($){
var $body = $('body');
var $outer = $('#content');
var $follow = $('#follow');
var followHt = $follow.height();
var minY = $outer.offset().top;
var maxY = minY + $outer.height() - followHt;
$(window).scroll(function(){
var yoff = $(#follow).scrollTop();
if (yoff > maxY) {
yoff = maxY;
}
else if (yoff < minY) {
yoff = minY;
}
$follow.css('top', yoff);
});
$follow.css('top', minY);
});
& have a inside <div id="content" class="site-content">
this smaller div
```<div id="follow" class="follow" >follow you</div>```
follow is positioned absolutely, content has height of 100%.
as i scroll down follow should do that. follow. but it doesn’t
thx
D