Skip to content

Instantly share code, notes, and snippets.

@amiel
Created November 30, 2012 01:19
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 amiel/4173114 to your computer and use it in GitHub Desktop.
Save amiel/4173114 to your computer and use it in GitHub Desktop.
var Activity = (function() {
var count = 0;
var show = $.fancybox.showActivity;
var hide = $.fancybox.hideActivity;
var start = function() {
++count;
show();
};
var stop = function() {
if (--count < 1) {
count = 0;
hide();
}
};
return { start: start, stop: stop };
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment