开发者

Hide search results until load and then fadeIn?

开发者 https://www.devze.com 2023-03-18 10:34 出处:网络
This code below fades out the first results then fades in too开发者_如何学Python early an the next results just appear anyway

This code below fades out the first results then fades in too开发者_如何学Python early an the next results just appear anyway

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


try

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


How about this?

$('.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);
});
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号