• Recent Questions
  • Popular Questions

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;
});
});

    Carlitos 90 cuore italiano!
    Posted 1 year ago

    I do not know. Sorry! : (

Answer this Question :

You must be logged in to post an answer. Signup Here, it takes 5 seconds :)

Other Questions