* @param String url The URL of the HTML file to load.
* @param Map params (optional) Key/value pairs that will be sent to the server.
* @param Function callback (optional) A function to be executed whenever the data is loaded (parameters: responseText, status and response itself).
- * @cat AJAX
+ * @cat Ajax
*/
loadIfModified: function( url, params, callback ) {
this.load( url, params, callback, 1 );
* @param String url The URL of the HTML file to load.
* @param Object params (optional) A set of key/value pairs that will be sent as data to the server.
* @param Function callback (optional) A function to be executed whenever the data is loaded (parameters: responseText, status and response itself).
- * @cat AJAX
+ * @cat Ajax
*/
load: function( url, params, callback, ifModified ) {
if ( url.constructor == Function )
*
* @name serialize
* @type String
- * @cat AJAX
+ * @cat Ajax
*/
serialize: function() {
return jQuery.param( this );
* @name evalScripts
* @type jQuery
* @private
- * @cat AJAX
+ * @cat Ajax
*/
evalScripts: function() {
return this.find('script').each(function(){
* @name ajaxStart
* @type jQuery
* @param Function callback The function to execute.
- * @cat AJAX
+ * @cat Ajax
*/
/**
* @name ajaxStop
* @type jQuery
* @param Function callback The function to execute.
- * @cat AJAX
+ * @cat Ajax
*/
/**
* @name ajaxComplete
* @type jQuery
* @param Function callback The function to execute.
- * @cat AJAX
+ * @cat Ajax
*/
/**
* @name ajaxSuccess
* @type jQuery
* @param Function callback The function to execute.
- * @cat AJAX
+ * @cat Ajax
*/
/**
* @name ajaxError
* @type jQuery
* @param Function callback The function to execute.
- * @cat AJAX
+ * @cat Ajax
*/
/**
* @name ajaxSend
* @type jQuery
* @param Function callback The function to execute.
- * @cat AJAX
+ * @cat Ajax
*/
jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
jQuery.fn[o] = function(f){
* @param String url The URL of the page to load.
* @param Map params (optional) Key/value pairs that will be sent to the server.
* @param Function callback (optional) A function to be executed whenever the data is loaded.
- * @cat AJAX
+ * @cat Ajax
*/
get: function( url, data, callback, type, ifModified ) {
// shift arguments if data argument was ommited
* @param String url The URL of the page to load.
* @param Map params (optional) Key/value pairs that will be sent to the server.
* @param Function callback (optional) A function to be executed whenever the data is loaded.
- * @cat AJAX
+ * @cat Ajax
*/
getIfModified: function( url, data, callback, type ) {
return jQuery.get(url, data, callback, type, 1);
* @type XMLHttpRequest
* @param String url The URL of the page to load.
* @param Function callback (optional) A function to be executed whenever the data is loaded.
- * @cat AJAX
+ * @cat Ajax
*/
getScript: function( url, callback ) {
return jQuery.get(url, null, callback, "script");
* @param String url The URL of the page to load.
* @param Map params (optional) Key/value pairs that will be sent to the server.
* @param Function callback A function to be executed whenever the data is loaded.
- * @cat AJAX
+ * @cat Ajax
*/
getJSON: function( url, data, callback ) {
return jQuery.get(url, data, callback, "json");
* @param String url The URL of the page to load.
* @param Map params (optional) Key/value pairs that will be sent to the server.
* @param Function callback (optional) A function to be executed whenever the data is loaded.
- * @cat AJAX
+ * @cat Ajax
*/
post: function( url, data, callback, type ) {
return jQuery.ajax({
* @name $.ajaxTimeout
* @type undefined
* @param Number time How long before an AJAX request times out.
- * @cat AJAX
+ * @cat Ajax
*/
ajaxTimeout: function( timeout ) {
jQuery.ajaxSettings.timeout = timeout;
* @name $.ajaxSetup
* @type undefined
* @param Map settings Key/value pairs to use for all AJAX requests
- * @cat AJAX
+ * @cat Ajax
*/
ajaxSetup: function( settings ) {
jQuery.extend( jQuery.ajaxSettings, settings );
* @name $.ajax
* @type XMLHttpRequest
* @param Map properties Key/value pairs to initialize the request with.
- * @cat AJAX
+ * @cat Ajax
* @see ajaxSetup(Map)
*/
ajax: function( s ) {
if ( a.constructor == Array || a.jquery )
// Serialize the form elements
for ( var i = 0; i < a.length; i++ )
- s.push( a[i].name + "=" + encodeURIComponent( a[i].value ) );
+ s.push( encodeURIComponent(a[i].name) + "=" + encodeURIComponent( a[i].value ) );
// Otherwise, assume that it's an object of key/value pairs
else
// If the value is an array then the key names need to be repeated
if ( a[j].constructor == Array )
for ( var k = 0; k < a[j].length; k++ )
- s.push( j + "=" + encodeURIComponent( a[j][k] ) );
+ s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j][k] ) );
else
- s.push( j + "=" + encodeURIComponent( a[j] ) );
+ s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );
// Return the resulting serialization
return s.join("&");