Thanks a bunch mkmanning, your brief answer had loads of meaning for
me:

a) we may look in the jQuery source file to see what a jQuery function
does -- jQuery is after all simply JavaScript

b) we can name any JavaScript object by using a colon after a name
(http://www.codingforums.com/showthread.php?t=65948), which is how the
hover function gets its name

c) $ (dollar sign) has no particular meaning in JavaScript (question
raised by looking at the beginning of the jQuery source file).  Thus
jQuery is free to give $_ a special meaning.

Looking at the definition of the hover function then, the answer to my
original question then appears to be, the hover function won't return
until the mouseleave event is triggered.

I still don't quite understand the details though.  If you could
indulge me with further explanation then my questions are:

I can see that the hover function takes two parameters, a function to
be called on mouseenter and a function to be called on mouseout.

What's the difference between mouseenter and mouseover; and mouseleave
and mouseout?  Mouseover and mouseout are JavaScript event handlers,
right?  But mouseleave and mouseout appear to be more than aliases,
looking at the jQuery source.

Also I'm lost as to what the chain of mouseenter and mouseleave could
mean:

        this.mouseenter(fnOver).mouseleave(fnOut);

Thanks again,
Carol

Reply via email to