Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
bfdf836d
Commit
bfdf836d
authored
Dec 22, 2006
by
Jörn Zaefferer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation for $.ajaxSetup
parent
fc84b9db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
+25
-6
newandnoteworthy.txt
newandnoteworthy.txt
+2
-1
ajax.js
src/ajax/ajax.js
+23
-5
No files found.
newandnoteworthy.txt
View file @
bfdf836d
New and Noteworthy
New and Noteworthy
-----------------
-----------------
1.0.5
1.0.5
/1.1
-----
-----
- Fixed synchronous requests
- Fixed synchronous requests
...
@@ -13,6 +13,7 @@ New and Noteworthy
...
@@ -13,6 +13,7 @@ New and Noteworthy
- Fixed docs for html(): Now mentions that is not available for XML documents
- Fixed docs for html(): Now mentions that is not available for XML documents
- Improved docs for blur() and focus(), mentioning the difference between calling the jQuery method and the DOM method
- Improved docs for blur() and focus(), mentioning the difference between calling the jQuery method and the DOM method
- Implemented a better error handling for ajax requests. Exceptions caused by dropping connections are now handled, too.
- Implemented a better error handling for ajax requests. Exceptions caused by dropping connections are now handled, too.
- Added global settings for AJAX (in addition to timeout), use $.ajaxSetup() to modify them
1.0.4
1.0.4
-----
-----
...
...
src/ajax/ajax.js
View file @
bfdf836d
...
@@ -419,6 +419,8 @@ jQuery.extend({
...
@@ -419,6 +419,8 @@ jQuery.extend({
* You can manually abort requests with the XMLHttpRequest's (returned by
* You can manually abort requests with the XMLHttpRequest's (returned by
* all ajax functions) abort() method.
* all ajax functions) abort() method.
*
*
* Deprecated. Use $.ajaxSetup instead.
*
* @example $.ajaxTimeout( 5000 );
* @example $.ajaxTimeout( 5000 );
* @desc Make all AJAX requests timeout after 5 seconds.
* @desc Make all AJAX requests timeout after 5 seconds.
*
*
...
@@ -428,18 +430,31 @@ jQuery.extend({
...
@@ -428,18 +430,31 @@ jQuery.extend({
* @cat AJAX
* @cat AJAX
*/
*/
ajaxTimeout
:
function
(
timeout
)
{
ajaxTimeout
:
function
(
timeout
)
{
//jQuery.timeout = timeout;
jQuery
.
ajaxSettings
.
timeout
=
timeout
;
jQuery
.
ajaxSettings
.
timeout
=
timeout
;
},
},
/**
* Setup global settings for AJAX requests.
*
* See $.ajax for a description of all available options.
*
* @example $.ajaxSetup( {
* url: "/xmlhttp/",
* global: false,
* type: "POST"
* } );
* @desc Sets the defaults for AJAX requests to the url "/xmlhttp/",
* disables global handlers and uses POST instead of GET
*
* @name $.ajaxSetup
* @type undefined
* @param Object settings Key/value pairs for ajax options
* @cat AJAX
*/
ajaxSetup
:
function
(
settings
)
{
ajaxSetup
:
function
(
settings
)
{
jQuery
.
extend
(
jQuery
.
ajaxSettings
,
settings
);
jQuery
.
extend
(
jQuery
.
ajaxSettings
,
settings
);
},
},
// Last-Modified header cache for next request
lastModified
:
{},
// TODO document me
ajaxSettings
:
{
ajaxSettings
:
{
global
:
true
,
global
:
true
,
type
:
"GET"
,
type
:
"GET"
,
...
@@ -448,6 +463,9 @@ jQuery.extend({
...
@@ -448,6 +463,9 @@ jQuery.extend({
processData
:
true
,
processData
:
true
,
async
:
true
async
:
true
},
},
// Last-Modified header cache for next request
lastModified
:
{},
/**
/**
* Load a remote page using an HTTP request.
* Load a remote page using an HTTP request.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment