calling a javascript function within markup created by javascript using Jquery
<p>I have form fields which are displayed using Jquery on click of a button.</p>

<pre><code>[select dropdown: conOperator]   [textfield: conValue ]  [select dropdown: conValuedd]
</code></pre>

<p>conValuedd is hidden by default.</p>

<p>I'm trying to figure out a way so that when I select either Apple or Banana in the first select drop down [conOperator], it hides the textfield conValue and displays drop down conValuedd instead. However, if I were to select Watermelon, it would display conValue and hide conValuedd again. Any ideas would be much appreciated.</p>

<pre><code>$('&lt;select id="conOperator' + num + '" name="conOperator' + num + '" class="standard_select" style="width:147px;"&gt;
    &lt;option&gt;Watermelon&lt;/option&gt;
    &lt;option&gt;Apple&lt;/option&gt;
    &lt;option&gt;Banana&lt;/option&gt;
   &lt;/select&gt;&amp;nbsp;
   &lt;input type="text" id="conValue' + num + '" name="conValue' + num + '" class="short_input" value="" style="width:147px;"&gt;&amp;nbsp;&amp;nbsp;
   &lt;select style="display:none" id="conValuedd' + num +'" multiple="multiple" size="5"&gt;
    &lt;option value="option1"&gt;Blah&lt;/option&gt;
    &lt;option value="option2"&gt;Blah&lt;/option&gt;
   &lt;/select&gt;').appendTo('#addCondition');
</code></pre>
