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
232da5dd
Commit
232da5dd
authored
Dec 23, 2006
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added back in Joern's changes - oops! Let me know if I missed any.
parent
cc5f4645
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
jquery.js
src/jquery/jquery.js
+15
-15
No files found.
src/jquery/jquery.js
View file @
232da5dd
...
...
@@ -162,6 +162,8 @@ var $ = jQuery;
* technically, chainable - there really isn't much use for chaining against it.
* You can have as many $(document).ready events on your page as you like.
*
* See ready(Function) for details about the ready event.
*
* @example $(function(){
* // Document is ready
* });
...
...
@@ -2100,9 +2102,6 @@ jQuery.extend({
event
=
jQuery
.
event
.
fix
(
event
||
window
.
event
||
{}
);
// Empty object is for triggered events with no data
// If no correct event was found, fail
if
(
!
event
)
return
false
;
var
returnValue
=
true
;
var
c
=
this
.
events
[
event
.
type
];
...
...
@@ -2125,20 +2124,19 @@ jQuery.extend({
},
fix
:
function
(
event
)
{
// check IE
if
(
jQuery
.
browser
.
msie
)
{
// fix target property, if available
// check prevents overwriting of fake target coming from trigger
if
(
event
.
srcElement
)
event
.
target
=
event
.
srcElement
;
// calculate pageX/Y
// Fix target property, if necessary
if
(
!
event
.
target
&&
event
.
srcElement
)
event
.
target
=
event
.
srcElement
;
// Calculate pageX/Y if missing and clientX/Y available
if
(
typeof
event
.
pageX
==
"undefined"
&&
typeof
event
.
clientX
!=
"undefined"
)
{
var
e
=
document
.
documentElement
,
b
=
document
.
body
;
event
.
pageX
=
event
.
clientX
+
(
e
.
scrollLeft
||
b
.
scrollLeft
);
event
.
pageY
=
event
.
clientY
+
(
e
.
scrollTop
||
b
.
scrollTop
);
}
//
c
heck safari and if target is a textnode
}
else
if
(
jQuery
.
browser
.
safari
&&
event
.
target
.
nodeType
==
3
)
{
//
C
heck safari and if target is a textnode
if
(
jQuery
.
browser
.
safari
&&
event
.
target
.
nodeType
==
3
)
{
// target is readonly, clone the event object
event
=
jQuery
.
extend
({},
event
);
// get parentnode from textnode
...
...
@@ -2146,15 +2144,17 @@ jQuery.extend({
}
// fix preventDefault and stopPropagation
if
(
!
event
.
preventDefault
)
if
(
!
event
.
preventDefault
)
{
event
.
preventDefault
=
function
()
{
this
.
returnValue
=
false
;
};
}
if
(
!
event
.
stopPropagation
)
if
(
!
event
.
stopPropagation
)
{
event
.
stopPropagation
=
function
()
{
this
.
cancelBubble
=
true
;
};
}
return
event
;
}
...
...
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