Posted by firebus on March 1, 2011 at 7:13pm
Howdy.
I have a small helper module in D6 with a .js file that adds a function to Drupal.behaviors.
I've found that if I try to add a second behavior function, neither behavior is triggered.
so:
Drupal.behaviors.first = function (context) {
alert('first');
} works and shows an alert on page load. but:
Drupal.behaviors.first = function (context) {
alert('first');
}
Drupal.behaviors.second = function (context) {
alert('second');
} fails, and I see no alerts on page load. is this expected behavior and/or is it documented anywhere?
thanks!

Comments
Are you using Firebug? If so,
Are you using Firebug? If so, can you see where the error is happening - on the execution of the behaviors functions, or on the assignment of them?
The Boise Drupal Guy!
i'm not seeing any errors
thanks for your response garrett!
yes, i have firebug installed.
iirc i wasn't getting any javascript errors.
however, now i am unable to reproduce the issue, so probably i was doing something dumb in my test case :(