Skip to content

Instantly share code, notes, and snippets.

@wodCZ
Created October 22, 2015 08:48
Show Gist options
  • Save wodCZ/5c24522e8cad5c75032b to your computer and use it in GitHub Desktop.
Save wodCZ/5c24522e8cad5c75032b to your computer and use it in GitHub Desktop.
nette.ajax spinner
(function($, undefined) {
$.nette.ext('spinner', {
init: function () {
},
start: function () {
this.counter++;
if (this.counter === 1) {
$("html").addClass('wait');
}
},
complete: function () {
this.counter--;
if (this.counter <= 0) {
$("html").removeClass('wait');
}
}
}, {
counter: 0
});
})(jQuery);
html.wait, html.wait * {
cursor: wait !important;
}
@DaweTaller
Copy link

Supr! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment