Skip to content

Instantly share code, notes, and snippets.

@beckettkev
Created May 13, 2015 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beckettkev/76ddc1851a0253d8a019 to your computer and use it in GitHub Desktop.
Save beckettkev/76ddc1851a0253d8a019 to your computer and use it in GitHub Desktop.
var _totalLoadedTemplates = 0;
var _requiredAmountOfTemplates = 3; //Let's say you need 3 templates to load before you run your code
$.SubscriptionEvent('myDisplayTemplateLoadingCheck').subscribe ( function (data ) {
totalLoadedTemplates += 1;
if (_totalLoadedTemplates === _requiredAmountOfTemplates) {
//your code goes here
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment