bootstrapx-clickover icon indicating copy to clipboard operation
bootstrapx-clickover copied to clipboard

When using on, you should also use off

Open pgrm opened this issue 12 years ago • 2 comments

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

pgrm avatar Feb 14 '13 15:02 pgrm

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.

blokezero avatar Feb 20 '13 10:02 blokezero

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

See also this issue: https://github.com/lecar-red/bootstrapx-clickover/issues/31

MiikaL avatar Sep 18 '13 10:09 MiikaL