How to get the value of two selected options using jquery?
<p>I have the following select options:</p>

<pre><code>&lt;select id="optionA"&gt;
&lt;option&gt; A &lt;/option&gt;
&lt;option&gt; B &lt;/option&gt;
&lt;option&gt; C &lt;/option&gt;
&lt;/select&gt;

&lt;select id="optionB"&gt;
&lt;option&gt; D &lt;/option&gt;
&lt;option&gt; E &lt;/option&gt;
&lt;option&gt; F &lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>The following jquery code is not working to determine the text values of each selected options:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function()
        {
            if($("#optionA").change() || ($("#optionB").change())
            {
                var textA = $(this).find("#optionA option:selected").text();
                var textB = $(this).find("#optionB option:selected").text();
                alert( + textA + " " + textB);
            }
        });
&lt;/script&gt;
</code></pre>

<p>Any idea what might be the problem?</p>
