fgnass / spin.js

A spinning activity indicator
http://spin.js.org
MIT License
9.3k stars 1.02k forks source link

Two spinners on the same page? #314

Closed RussNelson closed 8 years ago

RussNelson commented 8 years ago

I can't think of any reason why you couldn't have two spinners running on the same page in different <div>s, but even though I'm putting three spinners into three different divs, they're all getting put into the first div. What am I doing wrong?

http://rths.us/viz2.cgi?from=2015-12-08&to=2015-12-22&state=serieses&siteid=29&config=config.json&seriesid-2001=1&seriesid-2675=2&seriesid-2002=3#11/43.7924/-74.2889

RussNelson commented 8 years ago

It's definitely creating three spinners, all in the same div, which is not the div I named. Instead, they're all going into spinner0. Here is how the divs are created:

<div class="prepend-3" id="spinner%(rthsno)d" style="width:600px; background-color:#d0edf7"></div>
RussNelson commented 8 years ago

Even simpler example: http://rths.us/spinner.html

jonfreynik commented 8 years ago

From your example above, It looks like if you set the "#rths0", "#rths1", "#rths2" div position's to "relative" the spinners align properly on the page.

RussNelson commented 8 years ago

Yep, that'll do it!

rupesx26 commented 5 years ago

This work for me!

https://gist.github.com/rupesx26/241b3b7f1c907b226914990b02d35097