DEV Community


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

simonced profile image
simonced • Edited

Here is how I would do it:
Also, I don't recommend using different functions if the action is the same.
Instead, getting your paragraphs by class name instead of id is better.

andybullet profile image
AndyBullet Author

Yes, I had already corrected the code using that method.