I have a feed that contains posts. It looks something like this:

```
<div class="feed">
<div class="post">
  ...content...
</div>
<div class="post">
  ...content...
</div>
<div class="post">
  ...content...
</div>
</div>

```

If a user scrolls to a post and is there for 2 seconds (Most of the post is shown in the user's window), then we can call that a view. Is there a way in JavaScript to detect an event like this and label it as a view?