Skip to content

Instantly share code, notes, and snippets.

@robertmagnusson
Created February 19, 2014 08:06
Show Gist options
  • Save robertmagnusson/9087876 to your computer and use it in GitHub Desktop.
Save robertmagnusson/9087876 to your computer and use it in GitHub Desktop.
Throbber for loading screens.
/* Filter reload styling */
#throbber,
#loading {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
#loading {
z-index: 98;
background: url('../graphics/trans_bg.png');
display: none;
&.active {
display: block;
}
}
#throbber{
padding:10px;
background:url('../graphics/ajax-loader.gif') no-repeat center;
z-index: 99;
display: none;
&.active {
display: block;
}
}
<div id="loading"></div>
<div id="throbber"></div>
//Function that clones the Table of Contents to desired location in group-right (Wiki).
throbber = function() {
$('TARGET').click(function(){
$('#throbber').addClass('active');
$('#loading').addClass('active');
$('#throbber').click(function(){
$(this).removeClass('active');
$('#loading').removeClass('active');
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment