title: Get checkbox value with jQuery in .ajax data
body: <p>I'm trying to pass a boolean (checked/unchecked) value with .ajax, and I can't make it work. I have read a bunch about how to get the value of a checkbox using <code>.is(':checked')</code>, vs <code>.prop('checked')</code> but I can't seem to make anything work.</p>
  
  <p>Here is my HTML:</p>
  
  <pre><code>&lt;input type="checkbox" id="typeOfSearch" value="TRUE"&gt;
  &lt;label for="typeOfSearch"&gt;Exact Search?&lt;/label&gt;
  </code></pre>
  
  <p>And here is my JavaScript</p>
  
  <pre><code>   $.ajax({
              url: 'partsTable.php',
              type: 'post',
              dataType: 'html',
              data: {
                  major: $('select#dropdownMajor').val(),
                  minor: $('select#dropdownMinor').val(),
                  typeOfSearch: $('checkbox#typeOfSearch').prop('checked')
                  },
                  success: function(data) {
                      var result = data
                      $('#fromPartsTable').html(result);
                  }
              });
  </code></pre>
  
  <p>I can make the script work for the <code>select</code> boxes, and those continue to work after I add the checkbox, but the value of the checkbox is not being passed. </p>
  
  <p>All I am interested in is passing 'checked' vs 'unchecked'.</p>
  
  <p>Any help would be appreciated. Thanks.</p>