spin.js

jQuery: force display of modified dom

岁酱吖の 提交于 2019-12-19 05:46:44
问题 I've run in to a problem trying to have a 'loading spinner' on my page which runs while a table is being sorted, especially for slower clients as can take up to 10 seconds to sort the page. I can see the DOM gets modified with the spinner code, however it does not display. I was hoping there may be something I can do to force this display of spinner before the sort happens, and of course stop it when the sort is completed. My sort is based on 'sorttable.js' which I have modified to handle a

Loading spin.js with require.js

这一生的挚爱 提交于 2019-12-13 14:12:27
问题 I recently started a Javascript project and I am now moving it to require.js. Everything worked fine so far except for the spin.js library. I get the following error message when I try to access anything spin.js related: Uncaught ReferenceError: Spinner is not defined My requirejs.config looks like this: requirejs.config({ baseUrl: 'js', paths: { 'jquery': 'lib/jquery', 'spin': 'lib/spin', }, shim: { 'jquery' : { deps: [], }, 'spin' : { deps: [], exports: 'Spinner' }, } }); A sample module

insert the spin.js spinner into a div?

余生长醉 提交于 2019-12-07 10:37:56
问题 just found spin.js and it seems like a life saver. The question is how to i insert the spinner into my div? I have a follow button, that when clicked i remove the background image and currently replace with a loader.gif. How can i do the same but with spin.js? I knocked up a quick example of jsfiddle: http://jsfiddle.net/4XpHp/ I would like the spinner to be inside the red square div. <div id="foo"></div> <button id="spin"> Spin! </button> var opts = { lines: 13, // The number of lines to

insert the spin.js spinner into a div?

孤人 提交于 2019-12-05 13:03:00
just found spin.js and it seems like a life saver. The question is how to i insert the spinner into my div? I have a follow button, that when clicked i remove the background image and currently replace with a loader.gif. How can i do the same but with spin.js? I knocked up a quick example of jsfiddle: http://jsfiddle.net/4XpHp/ I would like the spinner to be inside the red square div. <div id="foo"></div> <button id="spin"> Spin! </button> var opts = { lines: 13, // The number of lines to draw length: 17, // The length of each line width: 8, // The line thickness radius: 21, // The radius of