当单击所需的 Div 时,如何在隐藏之前为 Div设置动画/突出显示?
Here is my JS DEMO:
我想先对Clicked 或 Selected Div 进行动画处理或突出显示,然后将其隐藏。
这是 HTML:
<div id="response_1" class="container">
<span id="1" class="hide_content">
<a href="javascript:void(0);">Click Here To Hide First Div</a>
</span>
</div>
<br>
<div id="response_2" class="container">
<span id="2" class="hide_content">
<a href="javascript:void(0);">Click Here To Hide Second Div</a>
</span>
</div>
<br>
<div id="response_3" class="container">
<span id="3" class="hide_content">
<a href="javascript:void(0);">Click Here To Hide Third Div</a>
</span>
</div>
这是CSS:
.container{
border:#666666 solid 1px;
padding:4px;
}
这是JS:
$('.hide_content').click(function ()
{
var current_number = $(this).attr("id");
$('#response_'+current_number).hide();
});