Hello, all,
I have kind of a weird jQuery issue going on, and I'm not sure what to make of it.
The project that I'm working on (unfortunately, it's on a restricted site, so no one can access it) is a blog that allows comments and replies.
From the main page, if a blog has any comments, there is a link at the bottom of the blog that allows the user to view the comment. Clicking the link will expand a hidden div that contains the comment.
If there is a reply to the comment, there is a text link ("More") that appears. Clicking the "More" link will use AJaX to run a query on the database to get the reply.
I have it set up so that when the link is clicked, a small spinner gif will appear to let the user know that the system is working in the background to get the reply. Once the database returns the data, the spinner disappears and is replaced by the content.
Here's the issue: I'm using promise().done(function(){}); to make that happen, which is supposed to wait until the data is loaded before making the spinner disappear. But the spinner is disappearing almost immediately, and the reply content is not appearing for at least 10 to 15 seconds.
It's as if the server is giving an immediate response of "Got it! Here ya go," but the browser is taking its sweet time displaying the content.
Any suggestions on either A) what's causing this, or B) how to get it to wait until the browser is ready to display the content before making the spinner disappear?
V/r,
^_^