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
You need to call the function like onclick="toggleNew();" in the div onclick. I just added your code in fiddle.
onclick="toggleNew();"