jQuery SerializeArray and Not selector
<p>I am using the .serializeArray function to gather all of the inputs of a form but I want to exclude inputs within a certain div class.  I thought the .not() selector would do this but it does not appear to be working.</p>

<p>At its most basic level here is my code:</p>

<p>HTML:</p>

<pre><code>&lt;form class="theForm"&gt;
  &lt;input name="a" value="a"/&gt;
  &lt;div class="excludeMe"&gt;
    &lt;input name="c" value="c"/&gt;
  &lt;/div&gt;
&lt;/form&gt;
</code></pre>

<p>Javascript:</p>

<pre><code>$.each($(".theForm").not(".excludeMe").serializeArray(), 
function() {
    alert(this.name);
});
</code></pre>

<p>I would expect the alert to just be 'a' but this is alerting 'a' and then 'b'.</p>

<p>Fiddle: <a href="https://jsfiddle.net/cysaczu5/" rel="nofollow">https://jsfiddle.net/cysaczu5/</a></p>