3
我用ajax調用來更新html。我需要爲隱藏添加元素,然後將動畫:如何將div隱藏爲使用jQuery隱藏?
$.ajax({
success: function (data, textStatus) {
$(".comments").prepend(data);
$(".comments .comment-frame:first").slideDown("slow"); // it doesn't work, since element is visible
新增的數據:
<div class="comment-frame">
...
</div>
我不能修改CSS使一流comment-frame
隱藏的,因爲我已經有與頁面上的其他元素同一班,應該保持可見。所以,不知何故,我應該加上data
隱藏。我該怎麼做?
嘗試'$( 「意見」)。預定(數據).hide()' –
是的.comment格在你的。點評DIV(你tyargetting)總是第一個div? –
Innuendo,這是我的第一個預感,但我懷疑這將隱藏包裹元素.comments。 –