| |
Low Pro |
I agree with Morgan's take which is to use Event.delegate within a
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
Link.Toggle.instances().first().onclick(event);
container element to easily have access to both the span and the form
from a single behavior.
that way: