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
100d3c35
Commit
100d3c35
authored
Mar 04, 2013
by
Michał Gołębiowski
Committed by
Dave Methvin
Mar 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved bind, unbind, delegate & undelegate to event-alias.js; refs #13554
parent
84a94aca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
18 deletions
+20
-18
event-alias.js
src/event-alias.js
+20
-3
event.js
src/event.js
+0
-15
No files found.
src/event-alias.js
View file @
100d3c35
...
...
@@ -10,6 +10,23 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
};
});
jQuery
.
fn
.
hover
=
function
(
fnOver
,
fnOut
)
{
return
this
.
mouseenter
(
fnOver
).
mouseleave
(
fnOut
||
fnOver
);
};
jQuery
.
fn
.
extend
({
hover
:
function
(
fnOver
,
fnOut
)
{
return
this
.
mouseenter
(
fnOver
).
mouseleave
(
fnOut
||
fnOver
);
},
bind
:
function
(
types
,
data
,
fn
)
{
return
this
.
on
(
types
,
null
,
data
,
fn
);
},
unbind
:
function
(
types
,
fn
)
{
return
this
.
off
(
types
,
null
,
fn
);
},
delegate
:
function
(
selector
,
types
,
data
,
fn
)
{
return
this
.
on
(
types
,
selector
,
data
,
fn
);
},
undelegate
:
function
(
selector
,
types
,
fn
)
{
// ( namespace ) or ( selector, types [, fn] )
return
arguments
.
length
===
1
?
this
.
off
(
selector
,
"**"
)
:
this
.
off
(
types
,
selector
||
"**"
,
fn
);
}
});
src/event.js
View file @
100d3c35
...
...
@@ -800,21 +800,6 @@ jQuery.fn.extend({
});
},
bind
:
function
(
types
,
data
,
fn
)
{
return
this
.
on
(
types
,
null
,
data
,
fn
);
},
unbind
:
function
(
types
,
fn
)
{
return
this
.
off
(
types
,
null
,
fn
);
},
delegate
:
function
(
selector
,
types
,
data
,
fn
)
{
return
this
.
on
(
types
,
selector
,
data
,
fn
);
},
undelegate
:
function
(
selector
,
types
,
fn
)
{
// ( namespace ) or ( selector, types [, fn] )
return
arguments
.
length
===
1
?
this
.
off
(
selector
,
"**"
)
:
this
.
off
(
types
,
selector
||
"**"
,
fn
);
},
trigger
:
function
(
type
,
data
)
{
return
this
.
each
(
function
()
{
jQuery
.
event
.
trigger
(
type
,
data
,
this
);
...
...
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