[jQuery] Event handlers not receiving the right parameter?

[jQuery] Event handlers not receiving the right parameter?


Hi all -
New member here. I'm just getting started with jQuery (after working
with Prototype for a while), and I'm liking it so far.
I've encountered a bit of a problem, though: jQuery doesn't seem to be
passing the correct parameter (the event object) to my event handlers.
I have a standard horizontal nav - an unordered list of links - for
which I'd like to set up mouseover behaviors. Here's my JavaScript:
$("#nav li").mouseover( function( evt ) {
alert( evt.target );
} );
$("#nav-home").trigger( "mouseover" );
(The alert() call, of course, is just for debugging purposes; IRL,
this function will display the relevant subnav.)
The trigger() call produces the expected result: Firefox alerts
"HTMLLIElement". Actual mouseovers, however, alert the hrefs of the
links. This is weird, because the event handlers aren't even
*attached* to the links - they're attached to the <li>s!
Any insights? I'm sure I'm just making a n00b mistake.