PlugLoader is custom jQuery plugin. It is doing so many stuff like ajax get request, compilation of template using handlebars when data is received and some other stuff. I would like to change code in such a way that until PlugLoader is not done, each/map should wait before executing next iteration.