Question: I am appending an array to a div using jquery, I want to show a small loading indicator while this happens, so I threw a call back function onto my append logic. This works, however, my loader will fire off it's `.hide()` before my array is painted into the div.

Is there a way I can only run the `.hide()` after the array has finished painting?

```
var contentpush = [];
// create x-amount of divs (x being 'tabs')
for (var i = 0; i < tabs; i++){
    contentpush.push('<li class="tab" role="tab"><a href="#tab'+(i+1)+'"><span class="icon"><span class="'+contentformat[i].icon+'" ></span></span><span class="title">'+contentformat[i].title+'</span></a></li>');
}

$('.tablist').append(contentpush.join('')).ready(function(){$('#skeleton').hide(); });;

```

Here is a gif of what is going on as well:
[![Slow Arrays](https://i.stack.imgur.com/nbqly.gif)](https://i.stack.imgur.com/nbqly.gif)

As you can see, the skeletal frame loader will disappear long before my array is actually painted into the div. Any thoughts on this are greatly appreciated!

Answer: 
The rules have not changed. However all global/static objects are constructed in the order they appear in the translation unit. It is just the order of initialization of multiple translation units that is unspecified.

Do note that function local static objects are constructed in a specified manner. They are constructed the first time the their declaration is reached and live until the end of the program. This behavior was changed in C++11 though as before C++11 that initialization was not thread safe where C++11 and above specifies that static initialization will be thread safe.
Yes: Global objects will be constructed in order within a compilation unit. Ando No: Nothing changed with C++11/14.