I need to order some onReady calls, I was looking at these questions here and here and found nothing. However it was quite long time ago, and maybe now there is something to workaround this.
so I need to do something like this:
$(function (){ console.log('second call'); })
$(function (){ console.log('first call'); })
To clarify why i need to do this:
The reason why I need that is these calls are spread through all the application, and what the most important: some of them are from third party and I cannot control them. But I do need to call my methods at first place, and i need to place scripts at the very and of the document. The code I working on is the legacy code and I cannot change it a lot, so answers like reconsider the way you are doing it would make no much sense for me. I just wandering if it possible or any workaround.
You could use an array to store the functions and have one onReady call that invokes them in the right order.