One thing I'm curious about is how to hide only the current div that I click on. Any suggestions on how to achieve that?
$('.ads-close-btn').click(function() {
$('.full-width-add').hide("slow");
});
alert('My main question is how can I hide only the current div');
.a_text {
color: red;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://use.fontawesome.com/16f70ff438.js"></script>
<!--First add div-->
<div class='full-width-add'>
<div class='a_text'>some text</div>
<a href='#' class='ads-close-btn'><i class='fa fa-close'></i></a>
</div>
<!--second add div-->
<div class='full-width-add'>
<div class='a_text'>some text</div>
<a href='#' class='ads-close-btn'><i class='fa fa-close'></i></a>
</div>
<!--third add div-->
<div class='full-width-add'>
<div class='a_text'>some text</div>
<a href='#' class='ads-close-btn'><i class='fa fa-close'></i></a>
</div>
<!--4th add div-->
<div class='full-width-add'>
<div class='a_text'>some text</div>
<a href='#' class='ads-close-btn'><i class='fa fa-close'></i></a>
</div>
My main question is how can I hide only the current div that I click on... Any suggestions?