jQuery form validation - get values from all select elements on page and make sure there aren't any duplicates
<p>Hopefully this should be quite a quick one!</p>

<p>I have a list of <code>&lt;select&gt;</code> elements on my page. Each of these drop-downs is a list of booking times for an online parents evening booking system.</p>

<p>Each select looks like this:</p>

<pre><code>&lt;select class="appointments" id="14" name="appointments[]"&gt;
    &lt;option&gt;.. Select:&lt;/option&gt;
    &lt;option value="1"&gt;[ 4:00 ]&lt;/option&gt;
    &lt;option value="2"&gt;[ 4:05 ]&lt;/option&gt;
    &lt;option value="3"&gt;[ 4:10 ] Eliza Fox&lt;/option&gt;
    &lt;option value="4"&gt;[ 4:15 ]&lt;/option&gt;
    &lt;option value="5"&gt;[ 4:20 ]&lt;/option&gt;
    &lt;option value="6"&gt;[ 4:25 ] diane davison&lt;/option&gt;
    &lt;option value="7"&gt;[ 4:30 ]&lt;/option&gt;
    &lt;option value="8"&gt;[ 4:35 ]&lt;/option&gt;
    &lt;option value="9"&gt;[ 4:40 ]&lt;/option&gt;
    &lt;option value="10"&gt;[ 4:45 ]&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>Depending on who has booked and who hasn't. The <code>value</code> integers are the booking slot specific to that time.</p>

<p>I don't want parents to be able to book two appointments at the same time, so I was thinking I could use jQuery to get an array of the <code>value</code> of each <code>&lt;select&gt;</code> element, then see if there are any duplicates.</p>

<p>If duplicates are found, I'd like to stop the form from being submitted and display an <code>alert</code>.</p>

<p>Thanks in advance,</p>
