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
eced6256
Commit
eced6256
authored
Jun 23, 2006
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forgot to change $.apply() to fn.apply().
parent
2d9979c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
event.js
event/event.js
+5
-5
No files found.
event/event.js
View file @
eced6256
...
@@ -16,7 +16,7 @@ jQuery.prototype.toggle = function(a,b) {
...
@@ -16,7 +16,7 @@ jQuery.prototype.toggle = function(a,b) {
e
.
preventDefault
();
e
.
preventDefault
();
// and execute the function
// and execute the function
return
jQuery
.
apply
(
this
,
this
.
last
,
[
e
]
)
||
false
;
return
this
.
last
.
apply
(
this
,
[
e
]
)
||
false
;
})
:
})
:
// Otherwise, execute the old toggle function
// Otherwise, execute the old toggle function
...
@@ -38,7 +38,7 @@ jQuery.prototype.hover = function(f,g) {
...
@@ -38,7 +38,7 @@ jQuery.prototype.hover = function(f,g) {
if
(
p
==
this
)
return
false
;
if
(
p
==
this
)
return
false
;
// Execute the right function
// Execute the right function
return
(
e
.
type
==
"mouseover"
?
f
:
g
).
apply
(
this
,[
e
]);
return
(
e
.
type
==
"mouseover"
?
f
:
g
).
apply
(
this
,
[
e
]);
}
}
// Bind the function to the two event listeners
// Bind the function to the two event listeners
...
@@ -52,7 +52,7 @@ jQuery.prototype.ready = function(f) {
...
@@ -52,7 +52,7 @@ jQuery.prototype.ready = function(f) {
// If the DOM is already ready
// If the DOM is already ready
if
(
jQuery
.
isReady
)
if
(
jQuery
.
isReady
)
// Execute the function immediately
// Execute the function immediately
jQuery
.
apply
(
document
,
f
);
f
.
apply
(
document
);
// Otherwise, remember the function for later
// Otherwise, remember the function for later
else
{
else
{
...
@@ -100,7 +100,7 @@ jQuery.prototype.ready = function(f) {
...
@@ -100,7 +100,7 @@ jQuery.prototype.ready = function(f) {
this
[
o
+
f
]
++
;
this
[
o
+
f
]
++
;
// And execute the bound function
// And execute the bound function
return
jQuery
.
apply
(
this
,
f
,
[
e
]);
return
f
.
apply
(
this
,
[
e
]);
});
});
};
};
...
@@ -124,7 +124,7 @@ jQuery.prototype.ready = function(f) {
...
@@ -124,7 +124,7 @@ jQuery.prototype.ready = function(f) {
if
(
jQuery
.
readyList
)
{
if
(
jQuery
.
readyList
)
{
// Execute all of them
// Execute all of them
for
(
var
i
=
0
;
i
<
jQuery
.
readyList
.
length
;
i
++
)
for
(
var
i
=
0
;
i
<
jQuery
.
readyList
.
length
;
i
++
)
jQuery
.
apply
(
document
,
jQuery
.
readyList
[
i
]
);
jQuery
.
readyList
[
i
].
apply
(
document
);
// Reset the list of functions
// Reset the list of functions
jQuery
.
readyList
=
null
;
jQuery
.
readyList
=
null
;
...
...
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