Displaying 1 result from an estimated 1 matches for "clickit".
Did you mean:
clickity
2006 Feb 10
0
Behaviour.js and prototype Event.observe
...t with the id of ''clickme'' will now have 3 onclick event observers.
Is there a way to work around this?
I see there''s Event.stopObserving, but I''m not sure how to use it. I tried
this:
Behaviour.register({
''#clickme'' : function(el) {
var clickit = function(event) {
alert("clickme was clicked");
}
Event.unObserve(el, ''click'', clickit);
Event.observe(el, ''click'', clickit);
}
});
Behaviour.apply();
Behaviour.apply();
but it still seemed to add up the event handlers.
I have since roll...