var params = { width:1680, height:1050, picture: undefined };
$.ajax({url: 'www.myurl.com', data: params});
This will invoke the $.ajax function, which then invokes the extend() function:
ajax: function( origSettings ) {
var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings);
The extend() function tries to remove out the undefined/null values:
jQuery.extend = jQuery.fn.extend = function() {
// Only deal with non-null/undefined values
if ( (options = arguments[ i ]) != null ) {
// Extend the base object
// Don't bring in undefined values
} else if ( copy !== undefined ) {
target[ name ] = copy;
No comments:
Post a Comment