The Gilded Age
I was using the built-in "wait cursor" to begin "hourglassing" when an operation began, like so:
document.body.style.cursor = 'wait';
...and then changing it back to the default when the operation completed, like so:
document.body.style.cursor = 'pointer';
For some reason, that blue spinny donutesque thingy gave my manager the fantods, though, so I replaced it with a fancy-pants, whiz-bang, gold-leaf, kid-glove, diamond-breastpin "hourglass" this way:
Add a line of HTML to reference the "Font Awesome" fonts:
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"
rel="stylesheet" type="text/css"
Then add a "span
" HTML element in your code where you want the "hourglass" to (sometimes) display, like so:
<span id="newhourglass"
class="fa fa-4x fa-refresh fa-spin boxRefresh hide" runat="server"></span>
Finally, add the JavaScript to unhide the font character/hourglass like so:
$("#newhourglass").removeClass("hide");
...and then hide it again like so:
$("#newhourglass").addClass("hide");
In context, you might have code something like this:
$("body").on("click", "#btnGetData",
function () {
$("#newhourglass").removeClass("hide");
$.ajax({
. . .
success: function (returneddata) {
$("body").html(returneddata);
$("#newhourglass").addClass("hide");
},
error: function () {
console.log('error in ajax call');
$("#newhourglass").addClass("hide");
}
});
});
I am in the process of morphing from a software developer into a portrayer of Mark Twain. My monologue (or one-man play, entitled "The Adventures of Mark Twain: As Told By Himself" and set in 1896) features Twain giving an overview of his life up till then. The performance includes the relating of interesting experiences and humorous anecdotes from Twain's boyhood and youth, his time as a riverboat pilot, his wild and woolly adventures in the Territory of Nevada and California, and experiences as a writer and world traveler, including recollections of meetings with many of the famous and powerful of the 19th century - royalty, business magnates, fellow authors, as well as intimate glimpses into his home life (his parents, siblings, wife, and children).
Peripatetic and picaresque, I have lived in eight states; specifically, besides my native California (where I was born and where I now again reside) in chronological order: New York, Montana, Alaska, Oklahoma, Wisconsin, Idaho, and Missouri.
I am also a writer of both fiction (for which I use a nom de plume, "Blackbird Crow Raven", as a nod to my Native American heritage - I am "½ Cowboy, ½ Indian") and nonfiction, including a two-volume social and cultural history of the U.S. which covers important events from 1620-2006: http://www.lulu.com/spotlight/blackbirdcraven