I am using this code:
$(document).ready(function(){
$(".SlideDiv").hide();
$(".Show_hide").show();
$('.Show_hide').click(function(){
$(".SlideDiv").slideToggle();
});
});
And this HTML:
<a href="#" class="Show_hide">Show/hide</a>
<div class="SlideDiv">this is content page
<a class="agree" href="https://www.google.com/" target="_blank">google</a>
</div>
And this CSS:
.SlideDiv
{
height:200px;
background-color:gray;
margin-top:10px;
}
.Show_hide
{
display:none;
}
The problem is that I have links inside the DIV and when they click that link open but show function didn't hide.