jQuery click events firing multiple times

后端 未结 25 2849
不知归路
不知归路 2020-11-22 11:01

I\'m attempting to write a video poker game in Javascript as a way of getting the basics of it down, and I\'ve run into a problem where the jQuery click event handlers are f

25条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 11:33

    If you're calling that function on each "click", then it's adding another pair of handlers on each call.

    Adding handlers with jQuery just isn't like setting the value of the "onclick" attribute. One can add as many handlers as one desires.

提交回复
热议问题