how to write 'NOT EQUAL TO' operator correctly in jquery
<p>I have following code in my body section:</p>

<pre><code>&lt;form action="" method="post"&gt;
&lt;select id="fruits" name="fruits"&gt;
&lt;option&gt;Apple&lt;/option&gt;
&lt;option&gt;Mango&lt;/option&gt;
&lt;option&gt;Orange&lt;/option&gt;
&lt;/select&gt;
&lt;select id="color" name="color"&gt;
&lt;option&gt;Red&lt;/option&gt;
&lt;option&gt;Green&lt;/option&gt;
&lt;option&gt;Yellow&lt;/option&gt;
&lt;/select&gt;
&lt;input type="text" id="result" value="" /&gt;
</code></pre>

<p>What I want to do, If a user select Apple or Mango from fruits and change color from second drop down menu, "Right Choice" will be appeared in #result input. On the other hand, if a user selects Orange from fruits and change color option, no change will be seen in #result input. So the jquery code will be like this:</p>

<pre><code>$("#color").change(function() {
if($("#fruits").val()!="Orange"){ $("#result").val("Right Choice"); }
});
</code></pre>

<p>But don't know why, this code is not working correctly, selecting all the fruits is changing the text of #result input to "Right Choice". But if I change the code as following it is working:</p>

<pre><code>$("#color").change(function() {
if($("#fruits").val()=="Orange"){
 /*--do nothing--*/
}else{
$("#result").val("Right Choice"); }
});
</code></pre>

<p>Both the first code and second code have same logical conditions but why the jquery code is not working for first case?</p>

<p>UPDATE:
I found if I put one not equal to condition, it is working correctly, but If I use an "or" operator the code is not working:</p>

<pre><code>$("#color").change(function() {
if($("#fruits").val()!="Orange" || $("#fruits").val()!="Mango"){
  $("#result").val("Right Choice"); 
}
});
</code></pre>

<p>It is not working, but it is working:</p>

<pre><code>$("#color").change(function() {
if($("#fruits").val()!="Orange"){
  $("#result").val("Right Choice"); 
}
});
</code></pre>
