So I am tweaking a script that takes an onClick and shows a hidden div. These were originally accomplished through mouseenter. I was hoping to just use a style change to hide the parent element once it is clicked.
I want to make the circle_big class disappear on the click of the href. Not quite sure what i am doing wrong . If I reference the parent of the parent everything disappears. With this usage I keep getting anCode:i.e. <div id="wrapper> <div class="circle assessment"> <h2>Assess And Plan</h2> <div class="circle_big"> <h2>Assess And Plan</h2> <ul> <li>Lorem ipsum dolor sit amet.</li> <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin. </li> <li>Lorem ipsum dolor sit amet, consectetur adipiscing.</li> </ul> <a onclick="this.parentNode.style.display = 'none';">Click Me</a> </div> </div>
Any help is appreciated.Code:Uncaught TypeError: Cannot read property 'style' of undefined
Thanks in advance.



Reply With Quote

Bookmarks