Is it possible to hide .child1 and display .child2 when .parent is clicked using javascript WITH NO TOGGLE? If yes, can some help me with the code?
<a class="parent" href="#" onclick="myFunction(); return false;">Parent</a>
<span class="child1"><a href="#">Child 1</a></span>
<span class="child2"><a href="#">Child 2</a></span>