I face a strange behavior with spin.js on IE8 and Safari 5.1 where it is working on http://spin.js.org/ (the spin is actually spinning) but not on my website. It works on Chrome/Firefox though.
Here are the options and how I call it into the code:
$opts : {
lines: 12 // The number of lines to draw
, length: 12 // The length of each line
, width: 6 // The line thickness
, radius: 18 // The radius of the inner circle
, scale: 1 // Scales overall size of the spinner
, corners: 1 // Corner roundness (0..1)
, color: '#aaa' // #rgb or #rrggbb or array of colors
, rotate: 0 // The rotation offset
, direction: 1 // 1: clockwise, -1: counterclockwise
, speed: 1 // Rounds per second
, trail: 60 // Afterglow percentage
, fps: 20 // Frames per second when using setTimeout() as a fallback for CSS
, zIndex: 2e9 // The z-index (defaults to 2000000000)
, className: 'spinner' // The CSS class to assign to the spinner
, top: '50%' // Top position relative to parent
, left: '50%' // Left position relative to parent
, shadow: false // Whether to render a shadow
, hwaccel: false // Whether to use hardware acceleration
, position: 'absolute' // Element positioning
}
var spinnerObject = new Spinner(s.$opts).spin();
s.$spinner.html(spinnerObject.el);
where s.$spinner is a div element where I append the spin.
Hey there.
I face a strange behavior with spin.js on IE8 and Safari 5.1 where it is working on http://spin.js.org/ (the spin is actually spinning) but not on my website. It works on Chrome/Firefox though.
Here are the options and how I call it into the code: $opts : { lines: 12 // The number of lines to draw , length: 12 // The length of each line , width: 6 // The line thickness , radius: 18 // The radius of the inner circle , scale: 1 // Scales overall size of the spinner , corners: 1 // Corner roundness (0..1) , color: '#aaa' // #rgb or #rrggbb or array of colors , rotate: 0 // The rotation offset , direction: 1 // 1: clockwise, -1: counterclockwise , speed: 1 // Rounds per second , trail: 60 // Afterglow percentage , fps: 20 // Frames per second when using setTimeout() as a fallback for CSS , zIndex: 2e9 // The z-index (defaults to 2000000000) , className: 'spinner' // The CSS class to assign to the spinner , top: '50%' // Top position relative to parent , left: '50%' // Left position relative to parent , shadow: false // Whether to render a shadow , hwaccel: false // Whether to use hardware acceleration , position: 'absolute' // Element positioning }
var spinnerObject = new Spinner(s.$opts).spin(); s.$spinner.html(spinnerObject.el);
where s.$spinner is a div element where I append the spin.
Did I do something wrong?