I'm using a jQuery datatable with Bootstrap v2. When the page first loads, it displays "Processing..." which is good. It also displays this message when I change pages or sort - also good.
Most of the time the database on the backend is quick and the Processing message is only on screen for one second or less.
However in some cases, like if they are doing a search across a large number of rows, it can take several seconds for this to complete.
I want to make it so that if the Processing message is still displayed after x seconds, that I update it somehow - such as changing the style to add a background-color: yellow around it, and/or changing the mesage to "Processing longer. Please wait...".
I figured the first step was to bind to the Filter event. I was able to do that. But I wasn't able to figure out how to bind to the initial loading of the table, which does Processing... and can take a while depending on the query.
Likewise I figure this may be a fairly common thing to want to do, so I was wondering if anyone can share a snippet of code that attaches to the necessary events and will automatically find the Processing div and update it on the fly after x seconds, and then clear it so that the next time it does an Processing... message it starts back again assuming it will be quick and only changes after x seconds.
Thanks in advance!