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');
});
精彩评论