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。 –