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
43f235f4
Commit
43f235f4
authored
Jan 31, 2007
by
Jörn Zaefferer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed docs for trigger, describing the second argument.
parent
de4e28e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
event.js
src/event/event.js
+11
-1
No files found.
src/event/event.js
View file @
43f235f4
...
...
@@ -69,7 +69,7 @@ jQuery.event = {
this
.
remove
(
element
,
j
);
},
trigger
:
function
(
type
,
data
,
element
)
{
trigger
:
function
(
type
,
data
,
element
)
{
// Clone the incoming data, if any
data
=
jQuery
.
makeArray
(
data
||
[]);
...
...
@@ -313,9 +313,19 @@ jQuery.fn.extend({
* @before <p click="alert('hello')">Hello</p>
* @result alert('hello')
*
* @example $("p").click(function(event, a, b) {
* // when a normal click fires, a and b are undefined
* // for a trigger like below a refers too "foo" and b refers to "bar"
* }).trigger("click", ["foo", "bar"]);
* @desc Example of how to pass arbitrary to an event
*
* @before <p click="alert('hello')">Hello</p>
* @result alert('hello')
*
* @name trigger
* @type jQuery
* @param String type An event type to trigger.
* @param Array data (optional) Additional data to pass as arguments (after the event object) to the event handler
* @cat Events
*/
trigger
:
function
(
type
,
data
)
{
...
...
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