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
feb9051c
Commit
feb9051c
authored
Dec 16, 2007
by
David Serduke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #1781 for warnings created on load by FF javascript.options.strict == true.
parent
4e339ef5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
36 deletions
+43
-36
ajax.js
src/ajax.js
+4
-4
core.js
src/core.js
+24
-23
event.js
src/event.js
+11
-5
fx.js
src/fx.js
+2
-2
offset.js
src/offset.js
+2
-2
No files found.
src/ajax.js
View file @
feb9051c
...
...
@@ -246,7 +246,7 @@ jQuery.extend({
head
.
appendChild
(
script
);
// We handle everything using the script element injection
return
;
return
undefined
;
}
var
requestDone
=
false
;
...
...
@@ -361,9 +361,6 @@ jQuery.extend({
// firefox 1.5 doesn't fire statechange for sync requests
if
(
!
s
.
async
)
onreadystatechange
();
// return XMLHttpRequest to allow aborting the request etc.
return
xml
;
function
success
(){
// If a local callback was specified, fire it and pass it the data
...
...
@@ -388,6 +385,9 @@ jQuery.extend({
if
(
s
.
global
&&
!
--
jQuery
.
active
)
jQuery
.
event
.
trigger
(
"ajaxStop"
);
}
// return XMLHttpRequest to allow aborting the request etc.
return
xml
;
},
handleError
:
function
(
s
,
xml
,
status
,
e
)
{
...
...
src/core.js
View file @
feb9051c
...
...
@@ -418,31 +418,32 @@ jQuery.fn = jQuery.prototype = {
}
}
else
return
this
.
each
(
function
(){
if
(
this
.
nodeType
!=
1
)
return
;
}
return
this
.
each
(
function
(){
if
(
this
.
nodeType
!=
1
)
return
;
if
(
value
.
constructor
==
Array
&&
/radio|checkbox/
.
test
(
this
.
type
)
)
this
.
checked
=
(
jQuery
.
inArray
(
this
.
value
,
value
)
>=
0
||
jQuery
.
inArray
(
this
.
name
,
value
)
>=
0
);
if
(
value
.
constructor
==
Array
&&
/radio|checkbox/
.
test
(
this
.
type
)
)
this
.
checked
=
(
jQuery
.
inArray
(
this
.
value
,
value
)
>=
0
||
jQuery
.
inArray
(
this
.
name
,
value
)
>=
0
);
else
if
(
jQuery
.
nodeName
(
this
,
"select"
)
)
{
var
values
=
value
.
constructor
==
Array
?
value
:
[
value
];
else
if
(
jQuery
.
nodeName
(
this
,
"select"
)
)
{
var
values
=
value
.
constructor
==
Array
?
value
:
[
value
];
jQuery
(
"option"
,
this
).
each
(
function
(){
this
.
selected
=
(
jQuery
.
inArray
(
this
.
value
,
values
)
>=
0
||
jQuery
.
inArray
(
this
.
text
,
values
)
>=
0
);
});
jQuery
(
"option"
,
this
).
each
(
function
(){
this
.
selected
=
(
jQuery
.
inArray
(
this
.
value
,
values
)
>=
0
||
jQuery
.
inArray
(
this
.
text
,
values
)
>=
0
);
});
if
(
!
values
.
length
)
this
.
selectedIndex
=
-
1
;
if
(
!
values
.
length
)
this
.
selectedIndex
=
-
1
;
}
else
this
.
value
=
value
;
});
}
else
this
.
value
=
value
;
});
},
html
:
function
(
value
)
{
...
...
@@ -971,9 +972,9 @@ jQuery.extend({
div
.
childNodes
:
[];
for
(
var
i
=
tbody
.
length
-
1
;
i
>=
0
;
--
i
)
if
(
jQuery
.
nodeName
(
tbody
[
i
],
"tbody"
)
&&
!
tbody
[
i
].
childNodes
.
length
)
tbody
[
i
].
parentNode
.
removeChild
(
tbody
[
i
]
);
for
(
var
j
=
tbody
.
length
-
1
;
j
>=
0
;
--
j
)
if
(
jQuery
.
nodeName
(
tbody
[
j
],
"tbody"
)
&&
!
tbody
[
j
].
childNodes
.
length
)
tbody
[
j
].
parentNode
.
removeChild
(
tbody
[
j
]
);
// IE completely kills leading whitespace when innerHTML is used
if
(
/^
\s
/
.
test
(
elem
)
)
...
...
src/event.js
View file @
feb9051c
...
...
@@ -170,7 +170,7 @@ jQuery.event = {
}
else
{
// don't do events on text and comment nodes
if
(
element
.
nodeType
==
3
||
element
.
nodeType
==
8
)
return
;
return
undefined
;
var
val
,
ret
,
fn
=
jQuery
.
isFunction
(
element
[
type
]
||
null
),
// Check to see if we need to provide a fake event, or not
...
...
@@ -332,14 +332,15 @@ jQuery.event = {
// If Safari or IE is used
// Continually check to see if the document is ready
if
(
jQuery
.
browser
.
msie
||
jQuery
.
browser
.
safari
)
(
function
(){
if
(
jQuery
.
browser
.
msie
||
jQuery
.
browser
.
safari
)
(
function
(){
try
{
// If IE is used, use the trick by Diego Perini
// http://javascript.nwbox.com/IEContentLoaded/
if
(
jQuery
.
browser
.
msie
||
document
.
readyState
!=
"loaded"
&&
document
.
readyState
!=
"complete"
)
document
.
documentElement
.
doScroll
(
"left"
);
}
catch
(
error
)
{
return
setTimeout
(
arguments
.
callee
,
0
);
setTimeout
(
arguments
.
callee
,
0
);
return
;
}
// and execute any waiting functions
...
...
@@ -367,17 +368,19 @@ jQuery.event = {
setup
:
function
()
{
if
(
jQuery
.
browser
.
msie
)
return
false
;
jQuery
(
this
).
bind
(
'mouseover'
,
jQuery
.
event
.
special
.
mouseenter
.
handler
);
return
true
;
},
teardown
:
function
()
{
if
(
jQuery
.
browser
.
msie
)
return
false
;
jQuery
(
this
).
unbind
(
'mouseover'
,
jQuery
.
event
.
special
.
mouseenter
.
handler
);
return
true
;
},
handler
:
function
(
event
)
{
var
args
=
Array
.
prototype
.
slice
.
call
(
arguments
,
1
);
// If we actually just moused on to a sub-element, ignore it
if
(
withinElement
(
event
,
this
)
)
return
;
if
(
withinElement
(
event
,
this
)
)
return
true
;
// Execute the right handlers by setting the event type to mouseenter
event
.
type
=
'mouseenter'
;
// Include the event object as the first argument
...
...
@@ -391,17 +394,19 @@ jQuery.event = {
setup
:
function
()
{
if
(
jQuery
.
browser
.
msie
)
return
false
;
jQuery
(
this
).
bind
(
'mouseout'
,
jQuery
.
event
.
special
.
mouseleave
.
handler
);
return
true
;
},
teardown
:
function
()
{
if
(
jQuery
.
browser
.
msie
)
return
false
;
jQuery
(
this
).
unbind
(
'mouseout'
,
jQuery
.
event
.
special
.
mouseleave
.
handler
);
return
true
;
},
handler
:
function
(
event
)
{
var
args
=
Array
.
prototype
.
slice
.
call
(
arguments
,
1
);
// If we actually just moused on to a sub-element, ignore it
if
(
withinElement
(
event
,
this
)
)
return
fals
e
;
if
(
withinElement
(
event
,
this
)
)
return
tru
e
;
// Execute the right handlers by setting the event type to mouseleave
event
.
type
=
'mouseleave'
;
// Include the event object as the first argument
...
...
@@ -444,6 +449,7 @@ jQuery.fn.extend({
triggerHandler
:
function
(
type
,
data
,
fn
)
{
if
(
this
[
0
]
)
return
jQuery
.
event
.
trigger
(
type
,
data
,
this
[
0
],
false
,
fn
);
return
undefined
;
},
toggle
:
function
()
{
...
...
src/fx.js
View file @
feb9051c
...
...
@@ -181,7 +181,7 @@ jQuery.fn.extend({
var
queue
=
function
(
elem
,
type
,
array
)
{
if
(
!
elem
)
return
;
return
undefined
;
type
=
type
||
"fx"
;
...
...
@@ -418,4 +418,4 @@ jQuery.fx.step = {
_default
:
function
(
fx
){
fx
.
elem
.
style
[
fx
.
prop
]
=
fx
.
now
+
fx
.
unit
;
}
};
\ No newline at end of file
};
src/offset.js
View file @
feb9051c
...
...
@@ -85,8 +85,6 @@ jQuery.fn.offset = function() {
results
=
{
top
:
top
,
left
:
left
};
}
return
results
;
function
border
(
elem
)
{
add
(
jQuery
.
css
(
elem
,
"borderLeftWidth"
),
jQuery
.
css
(
elem
,
"borderTopWidth"
)
);
}
...
...
@@ -95,4 +93,6 @@ jQuery.fn.offset = function() {
left
+=
parseInt
(
l
)
||
0
;
top
+=
parseInt
(
t
)
||
0
;
}
return
results
;
};
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