开发者

Displaying loading image for a long time in jquery

Hi I want to know is there any technique through which I can control the time for which the loading image usi开发者_开发知识库ng jquery can be displayed for a long time. For example:

$('#ajax').html('<img src="ajax.gif"/>');
$('#iframe').load('file.php');

Now I want to know is there any way through which I can display the ajax.gif for a specified amount of time? Please let me know.


try

var loader = '<img id="loader" src="http://tools.patentcalls.com/images/spinner.gif"/>';
jQuery(document).ready(function () {
    setTimeout( function() {
        jQuery('#ajax').html(loader);
    }, 1000 );
    jQuery('#iframe').load('file.php');
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜