On Aug 19, 10:25 pm, Eeby <[EMAIL PROTECTED]> wrote:
> In Firefox when I click on a checkbox, the alert comes up as expected.
> Then when I dismiss it, the alert comes up again.

I figured it out. In case anyone else runs into the same problem, here
it is...

I usually create a bindEvents() function and call it on $
(document).ready(). I put the event binding activity into the separate
function in case I add a new element to the page. I can just call
bindEvents() again to add functionality to the new element.

In this particular case, I have two .js files for the app, and I had
put a bindEvents() function in each. I wound up inadvertently calling
it twice, so the .click() event was getting bound twice to the
checkbox.

Moral is if you use this pattern call bindEvents() something specific
instead like "bindListPageEvents()" and call it something different in
each place you use it.

E

Reply via email to