title: jQuery get the name of a select option
body: <p>I have a dropdown list with several option, each option has a name attribute. When I select an option, a different list of checkboxes needs to appear - when another options is selected, that checkbox list should disappear and another one be displayed.</p>
  
  <p>I have created these checkbox lists and given them an ID that correlates to the name attribute of the option selected. I am trying to use the following code to display the correct checkbox list</p>
  
  <pre><code>$(document).ready(function(){
  
         $('#band_type_choices').on('change', function() {         
      $('.checkboxlist').hide();
      $('#checkboxlist_' + $(this).attr("name") ).css("display", "block");
  
  });
  </code></pre>
  
  <p>However nothing is happening.</p>
  
  <p>Here is my dropdown options:</p>
  
  <pre><code>&lt;select id="band_type_choices"&gt;
      &lt;option vlaue="0"&gt;&lt;/option&gt;
      &lt;option value="100" name="acoustic"&gt;Acoustic&lt;/option&gt;
      &lt;option value="0" name="jazz"&gt;Jazz/Easy Listening&lt;/option&gt;
      &lt;option value="0" name="acoustic_jazz"&gt;Acoustic + Jazz/Easy Listening&lt;/option&gt;
      &lt;option value="0" name="party"&gt;Party&lt;/option&gt;
      &lt;option value="0" name="acoustic_party"&gt;Acoustic + Party&lt;/option&gt;
      &lt;option value="0" name="jazz_party"&gt;Jazz/Easy Listening + Party&lt;/option&gt;
      &lt;option value="0" name="acoustic_jazz_party"&gt;Acoustic + Jazz/Easy Listening + Party&lt;/option&gt;
   &lt;/select&gt;
  </code></pre>
  
  <p>and an example of one of the lists:</p>
  
  <pre><code>&lt;div class="checkboxlist" id="checkboxlist_acoustic" style="display:none;"&gt;
  &lt;input type="checkbox" class="checkbox keys" name="keys" value="100" /&gt;Keys&lt;br&gt;
  &lt;input type="checkbox" class="checkbox acou_guit" name="acou_guit" value="100" /&gt;Acoustic Guitar&lt;br&gt;
  &lt;input type="checkbox" class="checkbox drums" name="drums" value="100" /&gt;Drums&lt;br&gt;
  &lt;input type="checkbox" class="checkbox alt_sax" name="alt_sax" value="100" /&gt;Alto Sax&lt;br&gt;
  &lt;input type="checkbox" class="checkbox ten_sax" name="ten_sax" value="100" /&gt;Tenor Sax&lt;br&gt;
  &lt;input type="checkbox" class="checkbox clarinet" name="clarinet" value="100" /&gt;Clarinet&lt;br&gt;
  &lt;input type="checkbox" class="checkbox trombone" name="trombone" value="100" /&gt;Trombone&lt;br&gt;
  &lt;input type="checkbox" class="checkbox trumpet" name="trumpet" value="100" /&gt;Trumpet&lt;br&gt;
  &lt;input type="checkbox" class="checkbox flute" name="flute" value="100" /&gt;Flute&lt;br&gt;
  &lt;input type="checkbox" class="checkbox cello" name="cello" value="100" /&gt;Cello&lt;br&gt;
  &lt;input type="checkbox" class="checkbox violin" name="violin" value="100" /&gt;Violin&lt;br&gt;
  &lt;/div&gt;
  </code></pre>