Skip to content

Commit 10e5d74

Browse files
committed
Calling .param() without an argument now returns an object literal made up of all the querystring key/value pairs.
1 parent dcf600c commit 10e5d74

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

jquery.url.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,14 @@ jQuery.url = function()
9494
{
9595
setUp(); // if the URI has not been parsed yet then do this first...
9696
}
97-
return ( parsed.queryKey[item] === null ) ? null : parsed.queryKey[item];
97+
if ( item === undefined )
98+
{
99+
return parsed.queryKey;
100+
}
101+
else
102+
{
103+
return ( parsed.queryKey[item] === null ) ? null : parsed.queryKey[item];
104+
}
98105
};
99106

100107
/**

0 commit comments

Comments
 (0)