title: Javascript: Get selected option from list and paste it on a label tag
body: <p>I have a list of countries, html, they have numeric ids and country name:</p>
  
  <p>Ex:</p>
  
  <pre><code>&lt;select name="userDto.nationality" id="userDto.nationality"&gt;
              &lt;option value=""&gt;Seleccione&lt;/option&gt;
                  &lt;option value="1"&gt;Alemania&lt;/option&gt;
                  &lt;option selected="selected" value="2"&gt;Argentina&lt;/option&gt;
                  &lt;option value="8"&gt;Australia&lt;/option&gt;
                  &lt;option value="9"&gt;Austria&lt;/option&gt;
                  &lt;option value="10"&gt;Bélgica&lt;/option&gt;
                  &lt;option value="11"&gt;Bolivia&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Im trying to use a jquery script to get the country of the list, not the value, the name and paste it inside of a label.</p>
  
  <pre><code>$(document).ready(function() {      
      $("#userDto\\.nationality option:selected").click(function() { $("#nationalityLabel").html(this.value); });
  
  });
  </code></pre>
  
  <p>And the HTML that should get the country name is:</p>
  
  <pre><code>&lt;div name="userLabelDiv" id="nationalityUserLabelDiv"&gt;
      &lt;label class="required"&gt;Nacionalidad :&lt;/label&gt;
      &lt;label id="nationalityLabel"&gt;&lt;/label&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>Could someone guide me through the problem? I cant find where is my error in the JS code.
  Thank you</p>