Small example on a loading Div?

Hi, thanks for looking into it. I was working with examples posted here on the discourse for older versions of bokeh. The new version (I am using 2.4.1) the events triggered in callbacks happens at the end of the callback, so the function makes the spinner blink in and out of view at the end of the callback. Same that is happening for you. Bryan posted a solution to the question I had a year ago: Can't get spinning loader to work. What am I doing wrong?

Maybe its best to animate the spinner first (when user clicks button) and then have the callback stop the animator after it has loaded the data when the document is idle?

I will try some more with the code you provided:D