Saturday, May 11, 2024
 Popular · Latest · Hot · Upcoming
167
rated 0 times [  169] [ 2]  / answers: 1 / hits: 65634  / 16 Years ago, wed, february 18, 2009, 12:00:00

I want to show to the user a state that the result is loading.
How can I change cursor or gif while loading result in div with $MyDiv.load(page.php) ?


More From » jquery

 Answers
120

  1. Initially style the loading image non-visible.

  2. Change the style to visible when you begin loading.

  3. Change the style to non-visible when loading finished using a callback argument to load().



Example:



 $(#loadImage).show();
$(#MyDiv).load(page.php, {limit: 25}, function(){
$(#loadImage).hide();
});

[#99955] Wednesday, February 11, 2009, 16 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kenyonmasonc

Total Points: 44
Total Questions: 117
Total Answers: 116

Location: Morocco
Member since Fri, May 22, 2020
4 Years ago
;