I have the following simple markup and style (see JSFiddle):
Html:
<div id="wrapper"><div id="content"></div></div>
CSS:
#content {
background-color:lightyellow;
height:200px;
color:green;
}
#wrapper{
border:1px solid black;
color:red;
}
I'm setting the spinner target to the #content
div
using both Vanilla JS and jQuery options and I encounter a couple of problems. First, in both cases, the spinner does not appear to be constructed in the middle of the targeted element's parent, contrary to what the documentation says:
Positioning
Since version 2.0.0 the spinner is absolutely positioned at 50% of its offset parent. You may specify a top and left option to position the spinner manually.
Second, when using Vanilla JS, the spinner does not use the color set on the target. When starting it using jQuery, it does (i.e. for #content
it uses green).
Am I understanding the documentation wrong? If so, how can I center the spinner inside a specific element? If not, why isn't the snippet above centering the spinner inside the target?