Google Groups Home
Help | Sign in
moving from Event.addBehavior to delegate?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
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.
End of messages
« Back to Discussions « Newer topic     Older topic »

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