mirror of
https://github.com/jquery/jquery.git
synced 2026-02-03 01:15:30 -05:00
@@ -55,14 +55,15 @@ function buildParams( prefix, obj, traditional, add ) {
|
||||
jQuery.param = function( a, traditional ) {
|
||||
var prefix,
|
||||
s = [],
|
||||
add = function( key, value ) {
|
||||
add = function( key, valueOrFunction ) {
|
||||
|
||||
// If value is a function, invoke it and return its value
|
||||
value = jQuery.isFunction( value ) ? value() : value;
|
||||
if ( value == null ) {
|
||||
value = "";
|
||||
}
|
||||
s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
|
||||
// If value is a function, invoke it and use its return value
|
||||
var value = jQuery.isFunction( valueOrFunction ) ?
|
||||
valueOrFunction() :
|
||||
valueOrFunction;
|
||||
|
||||
s[ s.length ] = encodeURIComponent( key ) + "=" +
|
||||
encodeURIComponent( value == null ? "" : value );
|
||||
};
|
||||
|
||||
// Set traditional to true for jQuery <= 1.3.2 behavior.
|
||||
|
||||
Reference in New Issue
Block a user