Skip to content

Instantly share code, notes, and snippets.

@listertech
Created September 30, 2011 10:04
Show Gist options
  • Save listertech/1253331 to your computer and use it in GitHub Desktop.
Save listertech/1253331 to your computer and use it in GitHub Desktop.
serialize visible form elements in jquery
y = $('#form_id').find('select').filter(':visible');
x = $('#form_id').find('input').filter(':visible').filter("input[type!='button']").filter("input[type!='submit']")
var z = jQuery.merge(x,y);
z.serialize();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment