Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I know the columnizing is done?

I'm using css property -column-width (and of course -moz-column-width and -webkit-column-width) to columnize the content on a webpage. The problem is when there are too much content, the proccess of columnizing is kind of slow, and can take seconds. I was told to put a spinner to alert user that the page is not ready yet, and the spinner also should block UI. But I can't find appropriate event to disable spinner. The $(document).ready() is too early. Any ideas?

like image 685
Dmitry Volkov Avatar asked Oct 15 '15 10:10

Dmitry Volkov


1 Answers

If $(document).ready() is too early, you could use $(window).load(...). That's really late in the process, but I can't think of anything interim.

If there's anything you can check the placement of, you could start polling as of $(document).ready() and wait for the placement to match what you expect or stop changing or some such. Polling every 10ms or so won't have any appreciable impact, and may let you get rid of the spinner earlier than the load event.

like image 63
T.J. Crowder Avatar answered Nov 08 '22 09:11

T.J. Crowder