Display (span) div id's when scrolling

Display (span) div id's when scrolling

im trying to display a div id when scrolling, when a div is 100px under the top id like it's id to be displayed. All divs have id's such as '1' '3' '5'.
All divs do have the class 'post'.

Second Question
all divs have odd numbers which id like to display in ' pagnering-odd' can I make it so if 1 is displayed in ' pagnering-odd' then 2 is displayed in  pagnering-even.
best
  1. $(window).scroll(function() {

  2.     $('.post').each(function() {
  3.         if( $("#container").offset().top > $(this).offset().top ) {
  4.             $('.pagnering-odd').text(this.id);
  5.         }
  6.     });
  7. });