jquery - ajax loading image with delay? -
i have ajax implemented refresh content want add delay - know how can add in code have?
$.ajax({ url: "<?php echo site_url('apply/processpersonaldetails'); ?>", type: 'post', data: form_data, success: function(msg) { $('#content').empty().html('<img src="../images/ajaxloader.gif" />'); $('#content').html(msg); } });
ah sorry, mean delay before new content has loaded, want show loading image before new content displayed...does make sense?
i don't quite understand mean delay in scenario use settimeout function schedule execution of callback @ later moment:
window.settimeout(function() { alert('this executed 3 seconds later'); }, 3000);
Comments
Post a Comment