Checkbox uncheck if other checkbox is selected
<p>I have many city input checkboxes. I have given the first checkbox the name <strong>All</strong>; if the user selects that then only <strong>All</strong> checkbox gets selected, and not the other city checkboxes.</p>

<p>If the user checks any other city, then the <strong>All</strong> checkbox should automatically be unchecked. I want to do this with JavaScript or jQuery.</p>

<pre><code>&lt;input type="checkbox" name="city_pref[]" id="city_all" value="0" checked /&gt;&lt;label for="city_all"&gt;All&lt;/label&gt;
&lt;input type="checkbox" name="city_pref[]" id="city_pref_1" value="Chicago" /&gt;&lt;label for="city_pref_1"&gt;Chicago&lt;/label&gt;
&lt;input type="checkbox" name="city_pref[]" id="city_pref_2" value="Texas" /&gt;&lt;label for="city_pref_2"&gt;Texas&lt;/label&gt;
</code></pre>

<p>and so on....</p>
