I want help on showing percentage rendered svg, while page is being loaded with jquery. I have a huge svg animation to load with loading message showing up.
More details:
I’ve a svg animation file which takes huge time to load, so during that period of time, i want to deliver some welcome message to the visitor.
Thanks for you help.
I was able to solve this problem using ajaxProgress Plugin http://www.kpozin.net/ajaxprogress
Thanks anyways.
Here’s the code snippet:
$.ajax("/myfile", {progress: function(jqXHR, progressEvent) { if (progressEvent.lengthComputable) { console.log("Loaded " + (Math.round(progressEvent.loaded / progressEvent.total * 100)) + "%"); } else { console.log("Loading..."); } }});