Skip to content
Permalink
Browse files
Added a number of additional speed gains (we now hold our own against…
… Dojo and DOMQuery), touched up some of the selector code, fixed some minor bugs, fixed a bug with triggerEvent in Opera, fixed some more test case bugs.
  • Loading branch information
jeresig committed Mar 26, 2007
1 parent 3446c3a commit 9c94ef4
Show file tree
Hide file tree
Showing 4 changed files with 869 additions and 864 deletions.
@@ -264,13 +264,12 @@ function equals(expected, actual, message) {
* @param String type
*/
function triggerEvent( elem, type, event ) {
if ( jQuery.browser.mozilla ) {
if ( jQuery.browser.mozilla || jQuery.browser.opera ) {
event = document.createEvent("MouseEvents");
event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
0, 0, 0, 0, 0, false, false, false, false, 0, null);
elem.dispatchEvent( event );
} else if ( jQuery.browser.msie || jQuery.browser.opera ) {
event = document.createEventObject();
elem.fireEvent("on"+type, event);
} else if ( jQuery.browser.msie ) {
elem.fireEvent("on"+type);
}
}

0 comments on commit 9c94ef4

Please sign in to comment.