我的主要問題是如何隱藏目前唯一的div我點擊......請建議我我能爲如何通過點擊此選擇錨點按鈕隱藏一個div
做
$('.ads-close-btn').click(function() {
$('.full-width-add').hide("slow");
});
alert('MY main question is how can i hide only 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>
我的主要問題是如何隱藏目前唯一的div我點擊......請建議我什麼我可以爲
太感謝你了 –