隐藏搜索结果直到加载然后淡入?

时间:2011-07-04 22:23:58

标签: jquery fadein

以下代码淡出第一个结果,然后过早消失,无论如何都会出现下一个结果

$('.content .sub_cont').load('superfetch.php?val=' + $('.searchInput').val(), hideLoader(function() { $(this).fadeIn(1500); }));

2 个答案:

答案 0 :(得分:1)

$('.content .sub_cont').load('superfetch.php?val=' + $('.searchInput').val(), hideLoader(function() { $(this).delay(1500).fadeIn(1500); }));

答案 1 :(得分:0)

这个怎么样?

$('.content .sub_cont').hide(0);
$.get('superfetch.php?val=' + $('.searchInput').val(), function(data){
    $('.content .sub_cont').html(data);
    $('.content .sub_cont').hide(0); //Sometimes it will show it when changing the HTML
    $('.content .sub_cont').fadeIn(1500);
});
相关问题