阅读背景:

为什么Jquery .click()会触发多个函数?

来源:互联网 

I've been making a game to practice programming, and I am having trouble using the Jquery .click() function. I have two buttons in my code, the start button and the attack button. When I click the start button, the .click() function fires the code for the other button as well, which causes my main menu to freeze up and not draw the game screen. I've used separate id's for the buttons, but they both seem to recognize the click on the start button. I can't get it to work in JSFiddle, but all the code is there. Can someone please tell me how to use multiple buttons?I've been making a game to practice programming




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: