I'm using Select2 data array as a source
Is there a way of running a script when this has finished loading and doing it's thing.
I want to hide a loading icon when it's completed.
kiwis80 The docs say:
Unlike the case of items supplied by AJAX data sources, items supplied as an array will be immediately rendered as <option> elements in the target <select> control.
Therefore it would not make sense to display a loading icon. However you might do this for the complete page and hide it by the load event.
I'm applying the styling and list to numerous select elements. So I think it 'loads' quickly but takes a while for the browser to render it all correctly (if that's the correct term).
Is there a way to hide a loading box AFTER that's been done?
So I think it 'loads' quickly but takes a while for the browser to render it all correctly (if that's the correct term).
Is this just an assumption or did you encounter issues like flickering or skipping?
I recommend to hide the loading box after the initializing all of the selects.
I'm just assuming. The select boxes show small while the browser loader is doing it's thing then bang it kick into gear and adjusts the size and it's complete.
As recommended before try to hide the loading box by the "load" event of the page.