Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using on, you should also use off #28

Open
pgrm opened this issue Feb 14, 2013 · 2 comments · May be fixed by #38
Open

When using on, you should also use off #28

pgrm opened this issue Feb 14, 2013 · 2 comments · May be fixed by #38

Comments

@pgrm
Copy link

pgrm commented Feb 14, 2013

When opening the clickover, you add an event via this.tip().on('click', '[data-dismiss="clickover"]', $.proxy(this.clickery, this));

please also remove it afterwards via this.tip().off('click', '[data-dismiss="clickover"]', $.proxy(this.clickery, this));

otherwise every time i try to close the same clickover, the clickery method is called one more time

cheers
Peter

@blokezero
Copy link

Thanks Peter, that was driving me nuts.
this.tip().off('click', '[data-dismiss="clickover"]', $.proxy(this.clickery, this)); inserted at line 111 sorted the problem for me.

noniq added a commit to die-antwort/bootstrapx-clickover that referenced this issue May 15, 2013
@noniq noniq linked a pull request May 15, 2013 that will close this issue
@MiikaL
Copy link

MiikaL commented Sep 18, 2013

Great fix! This caused the clickery event to be called as many times as the clickover had been opened.

See also this issue: #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants