Elgg  Version 1.11
spinner.js
Go to the documentation of this file.
1 define(function (require) {
2  var $ = require('jquery');
3 
4  var active = false;
5  var SHOW_DELAY = 20;
6 
7  $('body').append('<div class="elgg-spinner"><div class="elgg-ajax-loader"></div></div>');
8 
9  return {
10  start: function () {
11  active = true;
12  setTimeout(function () {
13  if (active) {
14  $('body').addClass('elgg-spinner-active');
15  }
16  }, SHOW_DELAY);
17  },
18 
19  stop: function () {
20  active = false;
21  $('body').removeClass('elgg-spinner-active');
22  }
23  };
24 });
ui datepicker calendar ui state active
Definition: admin.php:651
elgg require
Throw an error if the required package isn&#39;t present.
Definition: elgglib.js:164
define(function(require){var $=require('jquery');var active=false;var SHOW_DELAY=20;$('body').append('< div class="elgg-spinner">< div class="elgg-ajax-loader"></div ></div >');return{start:function(){active=true;setTimeout(function(){if(active){$('body').addClass('elgg-spinner-active');}}, SHOW_DELAY);}, stop:function(){active=false;$('body').removeClass('elgg-spinner-active');}};})