| Issue 257: | Animated loading image problem | |
| Back to list |
When huge amounts of events are loaded the browser freezes and my loading
image stops animating until all events are displayed.
I used the standard loading trigger to show and display a div containing my
loading gif.
To fix this problem I tried to modify the JSON callback function to hide
"loading_area1" containing the image and to show "loading_area2" containing
the simple text "Displaying data..."
Here is the code, some hide/show parts are redundant for testing purposes:
events: function(start, end, callback) {
$.getJSON(
"ajax/request_calendario.php", {
_: data.getTime(),
start: start.getTime(),
end: end.getTime(),
},
function(result) {
/* Image should disappear leaving only the message "Displaying data..." */
$("#loading_area1").hide();
//alert("WAIT ALERT");
callback(result);
}
);
},
loading: function(bool) {
if (bool) {
$('#loading_area1').show();
$('#loading_area2').show();
} else {
$('#loading_area1').hide();
$('#loading_area2').hide();
}
}
Unfortunately "loading_area1" stays displayed until the end of events
displaying (staying freezed as I said before).
If I try to uncomment the alert function all goes OK. Does it exist a way
to insert a small delay before using the callback? Can I use setTimeout()
inside a JSON call?
Dec 30, 2009
Project Member
#1
adamrs...@gmail.com
Jan 7, 2010
Love it ;)
Feb 4, 2010
You can close this ticket, with version 1.4.4 it's much faster!
Feb 6, 2010
sweet
Status:
Fixed
Aug 13, 2013
(No comment was entered for this change.)
Status:
Released
|
|
| ► Sign in to add a comment |