diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/news.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/news.js b/js/news.js index df95479dc..8a82ceb0c 100644 --- a/js/news.js +++ b/js/news.js @@ -684,6 +684,7 @@ $(document).ready(function(){ var item = this; var itemOffset = $(this).position().top; if(itemOffset <= 0 || scrolled >= scrollHeight){ + // wait and check if the item is still under the top edge setTimeout(function(){ markItemAsRead(scrollArea, item);}, 1000); } }) @@ -695,7 +696,7 @@ $(document).ready(function(){ }); /** - * Marks an item as read + * Marks an item as read which is called by the timeout * @param item the dom item */ function markItemAsRead(scrollArea, item){ |