It's now possible to trigger default events like .click(), .submit(), .focus(), etc. Using the jQuery event trigger.
This commit is contained in:
parent
0ae7198b9e
commit
4805a45c06
|
@ -82,12 +82,16 @@ jQuery.event = {
|
|||
|
||||
// Handle triggering a single element
|
||||
} else if ( element["on" + type] ) {
|
||||
if ( element[ type ] && element[ type ].constructor == Function )
|
||||
element[ type ]();
|
||||
else {
|
||||
// Pass along a fake event
|
||||
data.unshift( this.fix({ type: type, target: element }) );
|
||||
|
||||
// Trigger the event
|
||||
element["on" + type].apply( element, data );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
handle: function(event) {
|
||||
|
|
Loading…
Reference in a new issue