Skip to content

Instantly share code, notes, and snippets.

@mcraz
Created December 9, 2013 14:44
Show Gist options
  • Save mcraz/7873292 to your computer and use it in GitHub Desktop.
Save mcraz/7873292 to your computer and use it in GitHub Desktop.
Show spinning refresh icon (FontAwesome) when AJAX calls are in progress.
// AJAX Loading Proccesor
$("#data-terminal-processor").bind("ajaxStart", function(){
$(this).removeClass("icon-desktop").addClass("icon-refresh icon-spin");;
$("#display-teminal-header").hide();
}).bind("ajaxStop", function(){
$(this).removeClass("icon-refresh icon-spin").addClass("icon-desktop");;
$("#display-teminal-header").show();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment