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
onclick
toggleNew
div
In your condition : Use onclick="toggleNew();" // calling
onclick="toggleNew();"
This is the way to call a function.
And if you want to Pass the function then you use only toggleNew //passing
They are two different activities.