Check value select option list
<p>I´ve got a wordpress plugin that generates an option list. The generated code is like this:</p>

<pre><code>&lt;select name="question"&gt;
  &lt;option value="yes"&gt;Yes&lt;/option&gt;
  &lt;option value="no"&gt;No&lt;/option&gt;
  &lt;option value="maybe"&gt;Maybe&lt;/option&gt;&lt;/select&gt;

&lt;p id="text"&gt;some text&lt;/p&gt;
</code></pre>

<p>Underneath is a paragraph i like to show if the option maybe is selected. If Yes or No is selected this should be hidden.</p>

<p>The Jquery script i came up with (after lot's of googling, copying and pasting) is this:</p>

<pre><code>$('select').change(function(){
  var selectVal = $(‘select’).val();

            if( $selectVal=="maybe"){
              $('#text').show();}
            else{
            $('#text').hide();}
        });
</code></pre>

<p>Unfortunally this doesn't work. Anybody has an idea what i'm doing wrong or how to do it right?</p>
