I need a jquery function that executes when I scroll by a certain point. I got a page with multiple blog-posts. When I scroll by each post, an ajax request should be sent.
Since the blog-posts is different lengths, I can't have a specific position, it needs to be executed when scrolling by e.g the title of the post.
Like this.
<div>Post
<div onScrollBy="ajax();">Title</div>
<div>Description</div>
</div>
<div>Post
<div onScrollBy="ajax();">Title</div>
<div>Description</div>
</div>
<div>Post
<div onScrollBy="ajax();">Title</div>
<div>Description</div>
</div>
I just have no clue how to make this "onScrollBy" attribute, or if there is any other solution.
Thanks.