Created
November 27, 2012 19:13
-
-
Save themorgantown/4156351 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=9" /> | |
<meta name="viewport" content="user-scalable=yes, width=300" /> | |
<title>spinnerdemo</title> | |
<style> | |
body { | |
background-color: #FFFFFF; | |
margin: 0px; | |
} | |
</style> | |
<!-- make sure that spin.js is in the same | |
folder as this document. --> | |
<script src="spin.js"></script> | |
<script type="text/javascript"> | |
// this code removes the spinner when the document has loaded. | |
window.onload = function () | |
{ | |
var el = document.getElementById( 'spinnerarea' ); | |
el.parentNode.removeChild( el ); | |
} | |
</script> | |
</head> | |
<body> | |
<div style ="margin:auto;width:600px"> | |
<!-- copy these lines to your document: --> | |
<div id="spinnerdemo_hype_container" style="position:relative;overflow:hidden;width:600px;height:400px;"> | |
<script type="text/javascript" charset="utf-8" src="spinnerdemo_Resources/spinnerdemo_hype_generated_script.js?32899"></script> | |
<!-- The three lines below, and the script at the bottom of this document | |
are required for displaying the spinner. --> | |
<div style="margin-top:150px;" id="spinnerarea"></div> | |
<!-- The margin set above (150px) is the distance of the center | |
of the spinner from the top of the Hype area. --> | |
</div> | |
<!-- end copy --> | |
</div> | |
<!-- Use the options on http://fgnass.github.com/spin.js to set these properties --> | |
<script type="text/javascript" charset="utf-8"> | |
var opts = { | |
lines: 13, // The number of lines to draw | |
length: 7, // The length of each line | |
width: 4, // The line thickness | |
radius: 10, // The radius of the inner circle | |
rotate: 0, // The rotation offset | |
color: '#000', // #rgb or #rrggbb | |
speed: 1, // Rounds per second | |
trail: 60, // Afterglow percentage | |
shadow: false, // Whether to render a shadow | |
hwaccel: false, // Whether to use hardware acceleration | |
className: 'spinner', // The CSS class to assign to the spinner | |
zIndex: 2e9, // The z-index (defaults to 2000000000) | |
top: 'auto', // Top position relative to parent in px | |
left: 'auto' // Left position relative to parent in px | |
}; | |
var target = document.getElementById('spinnerarea'); | |
var spinner = new Spinner(opts).spin(target); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment