How do I prolong a jQuery loading animation?
Below is the script I currently have. It works fine but the loading animation appears for about a 1/3 of a second. How can you keep the loading animation up on the screen for a couple seconds?
// prepare the form when the DOM is ready
$(document).ready(function() {
// Setup the ajax indicator
$(“body”).append(‘

‘);
$(‘#ajaxBusy’).css({
display:”none”,
margin:”0px”,
paddingLeft:”0px”,
paddingRight:”0px”,
paddingTop:”0px”,
paddingBottom:”0px”,
position:”absolute”,
right:”50%”,
top:”50%”,
width:”auto”
});
// Ajax activity indicator bound
// to ajax start/stop document events
$(document).ajaxStart(function(){
$(‘#ajaxBusy’).show();
}).ajaxStop(function(){
$(‘#ajaxBusy’).hide();
});
$(“#intranet_help_button”).click(function()
{
$(“#container”).append(‘
‘)
.children(“#jquery_content”).hide()
.load(“drupal.html”, function()
{
$(“#jquery_content”).slideDown(2000);
});
return false;
});
});
- Category: JQuery Questions
Below is the script I currently have. It works fine but the loading animation appears for about a 1/3 of a second. How can you keep the loading animation up on the screen for a couple seconds?
// prepare the form when the DOM is ready
$(document).ready(function() {
// Setup the ajax indicator
$(“body”).append(‘

‘);
$(‘#ajaxBusy’).css({
display:”none”,
margin:”0px”,
paddingLeft:”0px”,
paddingRight:”0px”,
paddingTop:”0px”,
paddingBottom:”0px”,
position:”absolute”,
right:”50%”,
top:”50%”,
width:”auto”
});
// Ajax activity indicator bound
// to ajax start/stop document events
$(document).ajaxStart(function(){
$(‘#ajaxBusy’).show();
}).ajaxStop(function(){
$(‘#ajaxBusy’).hide();
});
$(“#intranet_help_button”).click(function()
{
$(“#container”).append(‘
‘)
.children(“#jquery_content”).hide()
.load(“drupal.html”, function()
{
$(“#jquery_content”).slideDown(2000);
});
return false;
});
});
Other Questions
Login
Search
Recent Comments
- dgdg_dasdad on How does JQUERY DIFFER FROM JAVASCRIPT ? WHAT IS ITJQUERY ?
- Anas Imtiaz on How does JQUERY DIFFER FROM JAVASCRIPT ? WHAT IS ITJQUERY ?
- David D on How does JQUERY DIFFER FROM JAVASCRIPT ? WHAT IS ITJQUERY ?
- Wolfman on How does JQUERY DIFFER FROM JAVASCRIPT ? WHAT IS ITJQUERY ?
- TnT on Having a Jquery PHP problem?


Carlitos 90 cuore italiano!
Posted 1 year ago
I do not know. Sorry! : (