Issue with checking for multiple submit buttons using jQuery
<p>I'm trying to check which of four submit buttons was pressed, using jQuery 1.7.2  If any of three of them are clicked, I want to show an alert box with the value of the button.  Here is the html code:</p>

<pre><code>&lt;body&gt;
    &lt;table&gt;
        &lt;tr&gt;
            &lt;td&gt;
                &lt;input type="submit" id="cancel" value="Cancel"&gt;
            &lt;/td&gt;
        &lt;/tr&gt;

        &lt;tr&gt;
            &lt;td&gt;
                &lt;input type="submit" id="find" value="Find"&gt;
            &lt;/td&gt;
        &lt;/tr&gt;

        &lt;tr&gt;
            &lt;td&gt;
                &lt;input type="submit" id="save" value="Save"&gt;
            &lt;/td&gt;
        &lt;/tr&gt;

        &lt;tr&gt;
            &lt;td&gt;
                &lt;input type="submit" id="update" value="Update"&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
&lt;/body&gt;
</code></pre>

<p>Here is the jQuery function code:</p>

<pre><code>&lt;script&gt;
        $(function(){
            $(':submit').click(function(){
                var value = $(this).val();
                //alert(value);

                if($(this).val() == "Save" || "Find" || "Clear") {
                //if($(this).val() == "Update") {
                    alert('The value is: ' + value);
                }
            });
        });
    &lt;/script&gt;
</code></pre>

<p>If I click on any of the three buttons I get the value displayed, but if I then click on the Update button it is also displayed.  I thought my if block would prevent that from happening?</p>

<p>If I comment out that line and use this code instead:</p>

<pre><code>if($(this).val() == "Update") {
                        alert('The value is: ' + value);
                    }
</code></pre>

<p>Then only when I click on the Update button will the alert fire.  What is wrong with the code here when I'm checking for multiple submit buttons?</p>
