Skip to content
Permalink
Browse files

Fixed docs for trigger, describing the second argument.

  • Loading branch information
jzaefferer committed Jan 31, 2007
1 parent de4e28e commit 43f235f4257359dfcf9270cf31c56aa547d01fd3
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/event/event.js
@@ -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 ) {

0 comments on commit 43f235f

Please sign in to comment.
You can’t perform that action at this time.