Google Groups Home
Help | Sign in
Message from discussion moving from Event.addBehavior to delegate?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
rubynuby  
View profile
 More options 31 Mar, 22:39
From: rubynuby <dear...@gmail.com>
Date: Mon, 31 Mar 2008 14:39:03 -0700 (PDT)
Local: Mon 31 Mar 2008 22:39
Subject: moving from Event.addBehavior to delegate?
I've been using Event.addBehavior and recently moved to 0.5.  I found
this note by Dan

"Event.addBehavior.reassignAfterAjax is now false by default:
Normally, if you are relying on this behavior it's much more efficient
to move to a solution using event delegation. However, if you do want
your behaviors reassigned to new content after Ajax calls then go
ahead and set it back to true again."

I did set Event.addBehavior.reassignAfterAjax to true and everything
worked again, but I'm curious as to how to use the more efficient
method.  I have a lot of code like this:

'a.img img:mouseover': function() {
//

}

how would I move that to event delegation?

thanks


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google