Go to Google Groups Home    Low Pro
Is it possible to execute behavior function for element from outside of this behavior?

szimek <szi...@gmail.com>

Hi,

I made a behavior for span elements that simply toggle themselfes
between add/cancel state and additionally toggle some element on the
page (i.e. a form) on onclick event - http://gist.github.com/118542.

It works fine, but the problem is when this is used to show i.e. a
form. In this case I'd like onclick event handler to be executed when
the form is submitted, so that I can hide the form and update span
element. The main problem is that I can't simply fire onclick event on
span element, which would solve the problem.

Do you have any other ideas how to solve it?