I'm trying to mark messages as "seen" when the div has entered the user's view (for example, the Facebook behavior of seen posts). My current attempt is a mix of the Unread gem (https://github.com/ledermann/unread) and the isOnScreen Jquery plugin (https://github.com/moagrius/isOnScreen).
But my two biggest problems are,
<div id="post-<%= post.id %>">, but how would I test for every possible div?
Am I approaching this the wrong way altogether?
See my answer to the same here: https://gorails.com/forum/how-to-mark-a-post-as-read-so-that-it-won-t-show-up-again-for-a-user#forum_post_14150
You can do two types of user interactions:
Hope this makes sense after reading the link above.
Join 29,763+ developers who get early access to new screencasts, articles, guides, updates, and more.