JavaScript onclick requires two clicks

前端 未结 8 1064
执笔经年
执笔经年 2021-01-14 19:33

My problem is that when onclicktriggers the toggleNew function it\'s not executing but when I click the div a second time it\'s execut

8条回答
  •  天涯浪人
    2021-01-14 20:23

    You need to call the function like onclick="toggleNew();" in the div onclick. I just added your code in fiddle.

提交回复
热议问题