Small change:
In the case "Team jQuery" decide to implement the jQuery.param()
String support enhancement suggestion (Ticket #1516) in the next
1.1.4.1 update, in the interim, you might want to add a version check:
(function($) {
var _inherit = $.param;
if ($.fn.jquery && $.fn.jquery <= "1.1.3.1") {
$.param = function(a) {
return (a.constructor == String)?a:_inherit(a);
};
}
})(jQuery);
---
HLS
On Aug 19, 11:46 am, Pops <[EMAIL PROTECTED]> wrote:
> My first plugin, simple, but may provide some usefulness, and reducing
> some confusion with new jQuery users using AJAX calls but still
> thinking in non-JSON mode to pass parameters.
>
> (function($) {
> var _inherit = $.param;
> $.param = function(a) { return (a.constructor == String)?
> a:_inherit(a); };
>
> })(jQuery);
>
> This overrides jQuery.param() with inheritance to support the passing
> of string KV pairs parameters while keeping with backward support for
> Object or Array parameters to the AJAX functions; .load, .get, etc.
>
> string: .load(url,"p1=v1&p2=v2.....&pn=vn");
> JSON: .load(url,{p1:'v1', p2:'v2' ....,pn:'vn'});
>
> --
> HLS