title: How to get the scroll position of an HTML element in a table?
body: <p>I have a table on my page with hundreds of rows. Each row contains select objects. For example:</p>
  
  <pre><code>&lt;tr&gt;
    &lt;td&gt;
      &lt;select onchange="changeSkillLevel(this)"&gt;
      &lt;option value='1'&gt;High&lt;/option&gt;
      &lt;option value='2'&gt;Medium&lt;/option&gt;
      &lt;option value='3'&gt;Low&lt;/option&gt;
      &lt;/select&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>When the user changes the select option, the page is reloaded via location.href, with querystrings appended for functionality. All that works fine, but if the user was way down at the bottom of the page operating on a select inside the 300th row, after the redirect, they're taken back to the top of the page. After the redirect I want to reset the scroll position to exactly where they were, preferably highlighting the <code>&lt;tr&gt;</code> containing the select object they just modified.</p>
  
  <p>I can't seem to get jquery's scrollTop to return anything but 0:</p>
  
  <pre><code>function changeSkillLevel(obj){
     alert($("#" + obj.id).scrollTop())
     [...]
  }
  </code></pre>
  
  <p>The alert always returns 0. I don't know if my selector is getting the obj (this) in the correct way and I don't know if I'm using scrollTop() correctly.</p>
  
  <p>If I could capture the scroll position, I figured I could pass it in the qstring/url, then when the page reloads, grab that scroll param and use jquery to forcibly scroll the page back down to where the user was.</p>
  
  <p>1- How can I achieve this?
  2- What's the best way to have the jquery selector attach to the "obj" param, which comes from "this" down in the selector object?</p>
  
  <p>Thanks!</p>