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
7b5ffcda
Commit
7b5ffcda
authored
Jul 11, 2012
by
Chris Faulkner
Committed by
Rick Waldron
Jul 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes a variety of typographical problems. Closes gh-853
parent
c210e08c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
19 deletions
+19
-19
jquery-basis.js
speed/jquery-basis.js
+12
-12
ajax.js
src/ajax.js
+1
-1
xhr.js
src/ajax/xhr.js
+1
-1
attributes.js
src/attributes.js
+1
-1
css.js
src/css.js
+3
-3
effects.js
src/effects.js
+1
-1
No files found.
speed/jquery-basis.js
View file @
7b5ffcda
...
@@ -519,7 +519,7 @@ jQuery.extend({
...
@@ -519,7 +519,7 @@ jQuery.extend({
noop
:
function
()
{},
noop
:
function
()
{},
// Evalu
l
ates a script in a global context
// Evaluates a script in a global context
globalEval
:
function
(
data
)
{
globalEval
:
function
(
data
)
{
if
(
data
&&
rnotwhite
.
test
(
data
)
)
{
if
(
data
&&
rnotwhite
.
test
(
data
)
)
{
// Inspired by code by Andrea Giammarchi
// Inspired by code by Andrea Giammarchi
...
@@ -1308,7 +1308,7 @@ jQuery.fn.extend({
...
@@ -1308,7 +1308,7 @@ jQuery.fn.extend({
classNames
=
value
.
split
(
rspace
);
classNames
=
value
.
split
(
rspace
);
while
(
(
className
=
classNames
[
i
++
])
)
{
while
(
(
className
=
classNames
[
i
++
])
)
{
// check each className given, space sep
e
rated list
// check each className given, space sep
a
rated list
state
=
isBool
?
state
:
!
self
.
hasClass
(
className
);
state
=
isBool
?
state
:
!
self
.
hasClass
(
className
);
self
[
state
?
"addClass"
:
"removeClass"
](
className
);
self
[
state
?
"addClass"
:
"removeClass"
](
className
);
}
}
...
@@ -1362,7 +1362,7 @@ jQuery.fn.extend({
...
@@ -1362,7 +1362,7 @@ jQuery.fn.extend({
var
option
=
options
[
i
];
var
option
=
options
[
i
];
if
(
option
.
selected
)
{
if
(
option
.
selected
)
{
// Get the specifc value for the option
// Get the specif
i
c value for the option
value
=
jQuery
(
option
).
val
();
value
=
jQuery
(
option
).
val
();
// We don't need an array for one selects
// We don't need an array for one selects
...
@@ -2634,7 +2634,7 @@ var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^
...
@@ -2634,7 +2634,7 @@ var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^
baseHasDuplicate = true;
baseHasDuplicate = true;
// Here we check if the JavaScript engine is using some sort of
// Here we check if the JavaScript engine is using some sort of
// optimization where it does not always call our comparis
i
on
// optimization where it does not always call our comparison
// function. If that is the case, discard the hasDuplicate value.
// function. If that is the case, discard the hasDuplicate value.
// Thus far that includes Google Chrome.
// Thus far that includes Google Chrome.
[0, 0].sort(function(){
[0, 0].sort(function(){
...
@@ -3413,7 +3413,7 @@ if ( document.documentElement.compareDocumentPosition ) {
...
@@ -3413,7 +3413,7 @@ if ( document.documentElement.compareDocumentPosition ) {
};
};
}
}
// Utility function for retr
ei
ving the text value of an array of DOM nodes
// Utility function for retr
ie
ving the text value of an array of DOM nodes
function getText( elems ) {
function getText( elems ) {
var ret = "", elem;
var ret = "", elem;
...
@@ -4147,12 +4147,12 @@ jQuery.fn.extend({
...
@@ -4147,12 +4147,12 @@ jQuery.fn.extend({
if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {
if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {
// IE copies events bound via attachEvent when
// IE copies events bound via attachEvent when
// using cloneNode. Calling detachEvent on the
// using cloneNode. Calling detachEvent on the
// clone will also remove the events from the orig
nal
// clone will also remove the events from the orig
inal.
// In order to get around this, we use innerHTML.
// In order to get around this, we use innerHTML.
// Unfortunately, this means some modifications to
// Unfortunately, this means some modifications to
// attributes in IE that are actually only stored
// attributes in IE that are actually only stored
// as properties will not be copied (such as the
// as properties will not be copied (such as the
//
the
name attribute on an input).
// name attribute on an input).
var html = this.outerHTML, ownerDocument = this.ownerDocument;
var html = this.outerHTML, ownerDocument = this.ownerDocument;
if ( !html ) {
if ( !html ) {
var div = ownerDocument.createElement("div");
var div = ownerDocument.createElement("div");
...
@@ -4884,7 +4884,7 @@ jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".sp
...
@@ -4884,7 +4884,7 @@ jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".sp
jQuery.extend({
jQuery.extend({
get: function( url, data, callback, type ) {
get: function( url, data, callback, type ) {
// shift arguments if data argument was omited
// shift arguments if data argument was omit
t
ed
if ( jQuery.isFunction( data ) ) {
if ( jQuery.isFunction( data ) ) {
type = type || callback;
type = type || callback;
callback = data;
callback = data;
...
@@ -4909,7 +4909,7 @@ jQuery.extend({
...
@@ -4909,7 +4909,7 @@ jQuery.extend({
},
},
post: function( url, data, callback, type ) {
post: function( url, data, callback, type ) {
// shift arguments if data argument was omited
// shift arguments if data argument was omit
t
ed
if ( jQuery.isFunction( data ) ) {
if ( jQuery.isFunction( data ) ) {
type = type || callback;
type = type || callback;
callback = data;
callback = data;
...
@@ -4946,7 +4946,7 @@ jQuery.extend({
...
@@ -4946,7 +4946,7 @@ jQuery.extend({
// Create the request object; Microsoft failed to properly
// Create the request object; Microsoft failed to properly
// implement the XMLHttpRequest in IE7 (can't request local files),
// implement the XMLHttpRequest in IE7 (can't request local files),
// so we use the ActiveXObject when it is available
// so we use the ActiveXObject when it is available
// This function can be overriden by calling jQuery.ajaxSetup
// This function can be overrid
d
en by calling jQuery.ajaxSetup
xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ?
xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ?
function() {
function() {
return new window.XMLHttpRequest();
return new window.XMLHttpRequest();
...
@@ -5148,7 +5148,7 @@ jQuery.extend({
...
@@ -5148,7 +5148,7 @@ jQuery.extend({
jQuery.event.trigger( "ajaxStop" );
jQuery.event.trigger( "ajaxStop" );
}
}
// close open
d
ed socket
// close opened socket
xhr.abort();
xhr.abort();
return false;
return false;
}
}
...
@@ -5254,7 +5254,7 @@ jQuery.extend({
...
@@ -5254,7 +5254,7 @@ jQuery.extend({
complete();
complete();
}
}
//
f
irefox 1.5 doesn't fire statechange for sync requests
//
F
irefox 1.5 doesn't fire statechange for sync requests
if ( !s.async ) {
if ( !s.async ) {
onreadystatechange();
onreadystatechange();
}
}
...
...
src/ajax.js
View file @
7b5ffcda
...
@@ -709,7 +709,7 @@ jQuery.extend({
...
@@ -709,7 +709,7 @@ jQuery.extend({
}
}
// aborting is no longer a cancelation
// aborting is no longer a cancel
l
ation
strAbort
=
"abort"
;
strAbort
=
"abort"
;
// Install callbacks on deferreds
// Install callbacks on deferreds
...
...
src/ajax/xhr.js
View file @
7b5ffcda
...
@@ -111,7 +111,7 @@ if ( jQuery.support.ajax ) {
...
@@ -111,7 +111,7 @@ if ( jQuery.support.ajax ) {
xml
;
xml
;
// Firefox throws exceptions when accessing properties
// Firefox throws exceptions when accessing properties
// of an xhr when a network error occured
// of an xhr when a network error occur
r
ed
// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
try
{
try
{
...
...
src/attributes.js
View file @
7b5ffcda
...
@@ -122,7 +122,7 @@ jQuery.fn.extend({
...
@@ -122,7 +122,7 @@ jQuery.fn.extend({
classNames
=
value
.
split
(
core_rspace
);
classNames
=
value
.
split
(
core_rspace
);
while
(
(
className
=
classNames
[
i
++
])
)
{
while
(
(
className
=
classNames
[
i
++
])
)
{
// check each className given, space sep
e
rated list
// check each className given, space sep
a
rated list
state
=
isBool
?
state
:
!
self
.
hasClass
(
className
);
state
=
isBool
?
state
:
!
self
.
hasClass
(
className
);
self
[
state
?
"addClass"
:
"removeClass"
](
className
);
self
[
state
?
"addClass"
:
"removeClass"
](
className
);
}
}
...
...
src/css.js
View file @
7b5ffcda
...
@@ -374,15 +374,15 @@ function augmentWidthOrHeight( elem, name, extra, isBorderBox ) {
...
@@ -374,15 +374,15 @@ function augmentWidthOrHeight( elem, name, extra, isBorderBox ) {
val
-=
parseFloat
(
curCSS
(
elem
,
"padding"
+
cssExpand
[
i
]
)
)
||
0
;
val
-=
parseFloat
(
curCSS
(
elem
,
"padding"
+
cssExpand
[
i
]
)
)
||
0
;
}
}
// at this point, extra isnt border nor margin, so remove border
// at this point, extra isn
'
t border nor margin, so remove border
if
(
extra
!==
"margin"
)
{
if
(
extra
!==
"margin"
)
{
val
-=
parseFloat
(
curCSS
(
elem
,
"border"
+
cssExpand
[
i
]
+
"Width"
)
)
||
0
;
val
-=
parseFloat
(
curCSS
(
elem
,
"border"
+
cssExpand
[
i
]
+
"Width"
)
)
||
0
;
}
}
}
else
{
}
else
{
// at this point, extra isnt content, so add padding
// at this point, extra isn
'
t content, so add padding
val
+=
parseFloat
(
curCSS
(
elem
,
"padding"
+
cssExpand
[
i
]
)
)
||
0
;
val
+=
parseFloat
(
curCSS
(
elem
,
"padding"
+
cssExpand
[
i
]
)
)
||
0
;
// at this point, extra isnt content nor padding, so add border
// at this point, extra isn
'
t content nor padding, so add border
if
(
extra
!==
"padding"
)
{
if
(
extra
!==
"padding"
)
{
val
+=
parseFloat
(
curCSS
(
elem
,
"border"
+
cssExpand
[
i
]
+
"Width"
)
)
||
0
;
val
+=
parseFloat
(
curCSS
(
elem
,
"border"
+
cssExpand
[
i
]
+
"Width"
)
)
||
0
;
}
}
...
...
src/effects.js
View file @
7b5ffcda
...
@@ -404,7 +404,7 @@ Tween.propHooks = {
...
@@ -404,7 +404,7 @@ Tween.propHooks = {
return
tween
.
elem
[
tween
.
prop
];
return
tween
.
elem
[
tween
.
prop
];
}
}
// passing any value as a 4th paramter to .css will automatically
// passing any value as a 4th param
e
ter to .css will automatically
// attempt a parseFloat and fallback to a string if the parse fails
// attempt a parseFloat and fallback to a string if the parse fails
// so, simple values such as "10px" are parsed to Float.
// so, simple values such as "10px" are parsed to Float.
// complex values such as "rotate(1rad)" are returned as is.
// complex values such as "rotate(1rad)" are returned as is.
...
...
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