title: How to get ID from selected CLASS while scrolling to perticular Section
body: <p>Im trying to get ID of section when I'm scrolling my webpage in Parallax website.
  When scroll will hit end of section then I want to take ID of that selected section.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;section id="section1" class="content" &gt;
      blah blah
  &lt;/section&gt;
  &lt;section id="section2" class="content" &gt;
      blah blah
  &lt;/section&gt;
  &lt;section id="section3" class="content" &gt;
      blah blah
  &lt;/section&gt;
  &lt;section id="section4" class="content" &gt;
      blah blah
  &lt;/section&gt;
  </code></pre>
  
  <p><strong>JQUERY</strong></p>
  
  <pre><code>$(window).bind('scroll', function() {
          if($(window).scrollTop() &gt;= $('.content').offset().top + $('.content').outerHeight() - window.innerHeight) {
            alert('end reached');
            //How to get ID here I have tried like this but no result:
              //$(this).attr("id");
              //$(this).closest("section").attr("id"); 
          }
  });
  </code></pre>