Show/hide content with specific class using jquery
<p>I'am new to jquery and maybe this is a stupid question but I have searched for an answer just about everywhere without finding one. So, here we go: </p>

<p>I want to show different content depending on what option I select in a drop down form. As I have learnt here on StackOverflow, you ca use the change function to do this: </p>

<p>Example:</p>

<pre><code>&lt;script type="text/javascript"&gt;

$(document).ready(function() {
$('#myselector').change(function(){
  $('.statecontent').hide();
  $('#' + $(this).val()).show();    
});
});

&lt;/script&gt;

 &lt;select id="myselector"&gt;
 &lt;option value="state1"&gt;&lt;/option&gt;&lt;br /&gt;
 &lt;option value="state2"&gt;&lt;/option&gt;&lt;br /&gt;
 &lt;option value="state3"&gt;&lt;/option&gt;&lt;br /&gt;
 &lt;/select&gt;

&lt;div id="state1" class="statecontent"&gt;State1 Specific Page Content Goes here&lt;/div&gt;&lt;br     /&gt;
&lt;div id="state2" class="statecontent"&gt;State2 Specific Page Content Goes here&lt;/div&gt;&lt;br /&gt;
&lt;div id="state3" class="statecontent"&gt;State3 Specific Page Content Goes here&lt;/div&gt;&lt;br /&gt;
</code></pre>

<p>This code will alove me to show content thats inside the different divs depending on what 'state' I choose in the drop down. But how do I connect the values of the drop down to a specific class instead of an id. The problem is of course that I want to show several divs that share a common class when i select a state in the drop down. </p>

<p>I would very much appreciate if anyone could point me in the right direction. </p>

<p>Paul</p>
