Skip to content
Advertisement

Why my green border doesn’t toggle?(disappear)

Why I can’t toggle the className in each div?
I want to give each div a green border when I double click on h1 tag inside each div and
when I double click again I want border to disapper
I put image for you to understand my situation
If you don’t get the problem comment under the question

JavaScript
JavaScript
JavaScript

enter image description here

Advertisement

Answer

Check this part of the code.

JavaScript

You are always checking with tasks variable which is a constant value. Instead of that use your initial_tasks. You’ll get your functionality.

Edit blissful-antonelli-6jexpw

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement