Actually I did end up using hover(), it works better for what I'm trying to 
do...so hand over the dunce cap!

But now I also know how to bind the same function to multiple events if I ever 
want to do that...

-- Josh

  ----- Original Message ----- 
  From: David Dexter 
  To: 'jQuery Discussion' 
  Sent: Tuesday, March 27, 2007 3:21 PM
  Subject: Re: [jQuery] bind two events to same function


  I have my dunce cap. which corner do I go sit in?

   

  David Dexter   |  brilliantlemming.com  |  Brentwood, CA  |  310.414.0949


------------------------------------------------------------------------------

  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aaron Heimlich
  Sent: Tuesday, March 27, 2007 3:02 PM
  To: jQuery Discussion
  Subject: Re: [jQuery] bind two events to same function

   

  On 3/27/07, David Dexter <[EMAIL PROTECTED]> wrote:

    Have a look at the hover() function it does exactly what you are looking
    for.


  Actually, it doesn't. hover() expects two different functions. From the API 
docs:

  "Whenever the mouse cursor is moved over a matched element, the first 
specified function is fired. Whenever the mouse moves off of the element, the 
second specified function fires." 

  Source: http://docs.jquery.com/Events#hover.28_over.2C_out_.29

  What Josh wants to do is bind the *exact same function* to do different 
events (which is what I showed him how to do). 

  -- 
  Aaron Heimlich
  Web Developer
  [EMAIL PROTECTED]
  http://aheimlich.freepgs.com 



------------------------------------------------------------------------------


  _______________________________________________
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to