In my project, I have a parent div and inside the parent div, I have three child elements. I want to hide all the child elements except for the first one. so I tried CSS and jquery kind of things, it's working fine but in the middle of that child element I have few strings(special characters) there (like this - ' | ', ' - '). those things are not hiding. any other ways to hide that element? CSS or JQuery?
jQuery(document).ready(function(){
jQuery(".login_content").children().hide();
jQuery('.welcome').show();
});
.login_content > * {
display: none;
}
.login_content > .welcome {
display: flex;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="login_content">
<div class="welcome">Welcome <b> name</b></div>
<b><a href="/">Agent Portal</a></b> |
<b><a href="/">Edit profile</a></b> -
<b><a href="/logout">Sign out</a></b>
</div>
this is my code, please help me to fix this.