title: How to assign the value in a div to a variable using jquery
body: <p>I know there's a simple answer to this. I'm trying to assign the value of the div "#loadN" to my index variable "n". If I hardcode a value for n it indexes properly, so I know that's not the problem. I just can't figure out how to assign n the value of the div. Any help would be appreciated.</p>
  
  <pre><code>$(document).ready(function(){
      $("#loadN").load("files/user01.profile.txt #year");
      var n = $("#loadN").val();
      $("#listYear option").eq(n).attr('selected','selected')
  });
  
  
  **files/user01.profile.txt**
  &lt;div id='year'&gt;3&lt;/div&gt;
  </code></pre>