Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 2, 2019 05:47 pm GMT

JQuery: I have a problem with a changement of class on click

Hi guys! I have a problem.
https://pastebin.com/LxDbhGP3
In this code there are two clickable paragraph: "7" and "8".
And by jquery, when I click one of them, the background of the button change, and after 2 seconds the first background returns.
The probelm is that it works only for a click: when I run the code, I click "7" and the function works, but if immediately after I click "8" it doesn't work. And vice versa if I start with "8" on run.
It's a weird problem, can you help me to find a solution?


Original Link: https://dev.to/andybullet/jquery-i-have-a-problem-with-a-changement-of-class-onclick-4hcn

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To