0

晚上!

目前我正在使用 imagesLoaded() 插件,并且我有一个“loading.gif”图像,在进行 ajax 调用时显示,但是,当 imagesLoaded() 函数对图像发挥作用时,没有“加载” .gif' 这显然意味着它没有使用 ajax。但这看起来有点欺骗页面,因为加载标志消失了,但页面仍然没有完全加载。

我想我在问如何在 imagesLoaded() 工作时让 loading.gif 出现?

http://newgameplus.nikuai.net/TEST/ (如果你想知道我的意思,第二个搜索栏。)

///////This is the code I used to make a loading bar when ajax is called. 
$("#spinner").bind("ajaxSend", function() {
    $(this).show();
}).bind("ajaxStop", function() {
    $(this).hide();
}).bind("ajaxError", function() {
    $(this).hide();
});

///////Where the plugin is called:
var $items = $( items.join('') );
$items.imagesLoaded(function(){
$container
.append( $items ).masonry( 'appended', $items, true );
});
}
4

0 回答 0