title: jQuery get form data for only visible fields
body: <p>In my <code>form</code> I got both visible and non-visible (<code>display:none</code>) elements. I need to get form data for only visible fields. I am collecting the data with the following code:</p>
  
  <pre><code>var formData = $('#myForm')
                 .serializeArray()
                 .reduce(function(obj, item) {   
                      //need to process only visible fields somewhere here                     
                      obj[item.name] = item.value;
                      return obj;
                  }, {});
  </code></pre>
  
  <p>I know about disabling the <code>name</code> propery of the input, but after the data is collected, I would like to return this property for all fields back. Any ideas would be welcome. Thank you.</p>