How to hide all elements except one div and its child element using jquery?
Simple solution: hide all and then show the one(in this case the second div and its children).
$('.create-account').children().hide(); $('.create-account>div:nth-of-type(2)').show();