Pure javascript — not even any images:
document.getElementById("button").onclick = function() {
var spinner = document.getElementById("spinner_container");
spinner.anim_mode = 0;
var animation = ["|", "https://stackoverflow.com/", "–", "\\"]
var spin = function() {
spinner.anim_mode = (spinner.anim_mode + 1) % animation.length;
spinner.innerHTML = animation[spinner.anim_mode];
};
spin();
setInterval(spin, 100);
};
solved javascript spinner for grails