I am creating some plugins that use ajax to fetch the information for the page. Now there are different plugins that do different functions.
All the plugins need to be used as stand-alone, but I also want to add the functionality that they can work nice together.
All the different plugins have there own JavaScript file, and functions. This is no problem in terms of HTTP requests, because most people have plugins that merge all the files into one when the website is deplyed.
--
Now for my question. As I say the different plugins get different parts of the website. For example, post counts, user tweets, user - statistics, post comments.
Now can I specify the priority on which this information is called from the website. I can not merge them all into one ajax call I think, because they are all individual working components.
Anyone know a good solution how I can spicify to first get the comments, after that the statistics, etc, etc.
My JS framework of choice is jQuery.