Skip to content

Instantly share code, notes, and snippets.

@jubstuff
Created August 26, 2015 11:01
Show Gist options
  • Save jubstuff/138a6da0a560c219a93b to your computer and use it in GitHub Desktop.
Save jubstuff/138a6da0a560c219a93b to your computer and use it in GitHub Desktop.
$.ajaxPrefilter(function( options, originalOptions, jqXHR ) {
var data = originalOptions.data;
if( data && data.action === 'ab_session_save' && data.time_from) {
options.data = $.param($.extend(originalOptions.data||{}, {
make: $('#'+$options.makeId).find("option:selected").text(),
model: $('#'+$options.modelId).find("option:selected").text(),
version: $('#'+$options.versionId).find("option:selected").text()
}));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment