title: Return span text from selected radio button using JQuery/JavaScript
body: <p>I have a list of radio buttons of which only one can be checked. I would like to retrieve the  values from the selected radio button. I do not seem to  get any text in returned alert.</p>
  
  <p><em>Please note that this HTML is generated automatically and therefore I cannot edit it. Adding value to the  is therefore not possible.</em></p>
  
  <pre><code>&lt;form class="leaflet-control-layers-list"&gt;
  &lt;div class="leaflet-control-layers-base"&gt;
      &lt;label&gt;
          &lt;input class="leaflet-control-layers-selector" type="radio" checked="checked" name="leaflet-base-layers"&gt;&lt;/input&gt;
              &lt;span&gt;
                  Gemeenten
              &lt;/span&gt;
     &lt;/label&gt;
     &lt;label&gt;
          &lt;input class="leaflet-control-layers-selector" type="radio" name="leaflet-base-layers"&gt;&lt;/input&gt;
              &lt;span&gt;
                  Wijken
              &lt;/span&gt;
     &lt;/label&gt;
     &lt;label&gt;
         &lt;input class="leaflet-control-layers-selector" type="radio" name="leaflet-base-layers"&gt;&lt;/input&gt;
             &lt;span&gt;
                 Buurten
             &lt;/span&gt;
     &lt;/label&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This is the jQuery Script which I use:</p>
  
  <pre><code>radioButtonText = $('input[name=leaflet-base-layers].leaflet-control-layers-selector:checked').html();
  alert(radioButtonText);
  </code></pre>
  
  <p>Does anybody know how I can return the text `Gemeenten´, ´Buurten´ or ´Wijken´ depending on which radio button is selected?</p>