title: geting value of relative select element aftered with jquery
body: <p>this is my html code:</p>
  
  <pre><code>&lt;input type="button" class="addSection" value="Add section" /&gt;
  &lt;br /&gt;
  &lt;hr /&gt;
  &lt;div id='rep'&gt;&lt;/div&gt;
  </code></pre>
  
  <p>and this is my script:</p>
  
  <pre><code>$(document).ready(function() {
      $('.addSection').click(function() {
  
          $('#rep').after('&lt;br /&gt;' +
              '&lt;select class="srtCom"&gt;' +
              '&lt;option value="key"&gt;key&lt;/option&gt;' +
              '&lt;option value="luck"&gt;luck&lt;/option&gt;' +
              '&lt;option value="college"&gt;college&lt;/option&gt;' +
              '&lt;/select&gt;' +
              '&lt;br /&gt;');
  
  
          alert($('#rep').next('.srtCom').val());
          });
       });
  </code></pre>
  
  <p>my question is why i cant get value of aftered select element.
  i used next() function to reach select element and get its value but in alert() function i get undefined!!
  thanks for your help.</p>