Skip to content

Instantly share code, notes, and snippets.

@pehrlich
Created March 20, 2011 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pehrlich/878211 to your computer and use it in GitHub Desktop.
Save pehrlich/878211 to your computer and use it in GitHub Desktop.
Allow determination of ajax data-type by surveying the submit button
//var method, url, data, dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType);
var method, url, data, dataType = element.data('type') || element.find(':submit:first').data('type') || ($.ajaxSettings && $.ajaxSettings.dataType);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment