title: Get div html with select value of dynamically created select in jquery
body: <p>I dynamically created a div with select options in jQuery. Here's a sample.</p>
  
  <pre><code>&lt;div id="myDiv"&gt;
      &lt;select id="mySelect"&gt;
          &lt;option selected value="0"&gt;A&lt;/option&gt;
          &lt;option value="1"&gt;B&lt;/option&gt;
          &lt;option value="2"&gt;C&lt;/option&gt;
          &lt;option value="3"&gt;D&lt;/option&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>0 is the default selected value.</p>
  
  <p>When I get html of the div like this <code>$("#myDiv").html()</code>, it gets the below.</p>
  
  <pre><code>&lt;div id="myDiv"&gt;
      &lt;select id="mySelect"&gt;
          &lt;option selected value="0"&gt;A&lt;/option&gt;
          &lt;option value="1"&gt;B&lt;/option&gt;
          &lt;option value="2"&gt;C&lt;/option&gt;
          &lt;option value="3"&gt;D&lt;/option&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>It's the same as the above code which is normal.</p>
  
  <p>However, when I change the selected value to 2, <code>$("#myDiv").html()</code> is still getting same code. 0 is still the selected value.</p>
  
  <p>How can I get the html of the div, with the dynamically changed value?</p>