I am trying to replace a div with another one once an element has been clicked, but I cant seem to get it working. I have included the HTML and jquery code below. The element which is trying to slide in has a css property of display: none.
<h5 class="optiontabs meal-description">DESCRIPTION</h5>
<h5 class="optiontabs nutrition-description">NUTRITIONAL INFO</h5>
Reason your code isn't working because you are using .find() method to find a container "nutrition-breakdown" inside "nutrition-description", which is not correct, "nutrition-breakdown" is actually a sibling of "nutrition-description"
Kindly use below code to fit you requirement.
If you dont need animation then better tp use .show() instead of slideDown().