Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Is it possible to execute behavior function for element from outside of this behavior?
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
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Nathan  
View profile   Translate to Translated (View Original)
 More options 31 May, 08:50
From: Nathan <XGamer...@gmail.com>
Date: Sun, 31 May 2009 00:50:07 -0700 (PDT)
Local: Sun 31 May 2009 08:50
Subject: Re: Is it possible to execute behavior function for element from outside of this behavior?
I agree with Morgan's take which is to use Event.delegate within a
container element to easily have access to both the span and the form
from a single behavior.

Otherwise, you can indeed execute a behavior outside the behavior. i.e

var example = new Link.Toggle($('some-element'));

then

example.onclick(event);

or you can access the instances of a behavior and find the right one
that way:

Link.Toggle.instances().first().onclick(event);


    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
©2009 Google