title: Get position of clicked element with jquery?
body: <p>I want to scroll to get an item into view when it's clicked, however I cannot manage to get it's top position on click:</p>
  
  <p>This is what I'm trying right now:</p>
  
  <pre><code>    $( "section" ).click(function(e) {
          console.log("thing top: "+$(this).position().top);
          //$('html,body').animate({ scrollTop: 0 }, 'slow');
          //return false; 
      });
  </code></pre>
  
  <p>However I always get the same top position, now matter what element is clicked. How can I do this right?</p>