mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-28 18:50:08 +00:00
moved spinner interface to jquery, back to more uniform style...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
b81712a422
commit
7f3192f99f
16
ext-lib/jquery.spin.js
Executable file
16
ext-lib/jquery.spin.js
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
// taken from: http://fgnass.github.com/spin.js/
|
||||||
|
$.fn.spin = function(opts) {
|
||||||
|
this.each(function() {
|
||||||
|
var $this = $(this),
|
||||||
|
data = $this.data();
|
||||||
|
|
||||||
|
if (data.spinner) {
|
||||||
|
data.spinner.stop();
|
||||||
|
delete data.spinner;
|
||||||
|
}
|
||||||
|
if (opts !== false) {
|
||||||
|
data.spinner = new Spinner($.extend({color: $this.css('color')}, opts)).spin(this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return this;
|
||||||
|
};
|
||||||
@ -12,6 +12,7 @@
|
|||||||
<script src="ext-lib/jquery.touchSwipe.js"></script>
|
<script src="ext-lib/jquery.touchSwipe.js"></script>
|
||||||
<script src="ext-lib/jstorage.js"></script>
|
<script src="ext-lib/jstorage.js"></script>
|
||||||
<script src="ext-lib/spin.js"></script>
|
<script src="ext-lib/spin.js"></script>
|
||||||
|
<script src="ext-lib/jquery.spin.js"></script>
|
||||||
<!-- EXPERIMENTAL -->
|
<!-- EXPERIMENTAL -->
|
||||||
<!--
|
<!--
|
||||||
XXX scrollTo is a cool and a powerfull tool but it needs a sustantial code reorganization
|
XXX scrollTo is a cool and a powerfull tool but it needs a sustantial code reorganization
|
||||||
@ -151,8 +152,9 @@ $(document).ready(function(){
|
|||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
$('.splash').fadeOut()
|
$('.splash').fadeOut()
|
||||||
}, 350)
|
}, 350)
|
||||||
|
// remove the spinner...
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
spinner.stop()
|
$('#spinner').spin(false)
|
||||||
}, 500)
|
}, 500)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -195,7 +197,7 @@ $(document).ready(function(){
|
|||||||
top: 'auto', // Top position relative to parent in px
|
top: 'auto', // Top position relative to parent in px
|
||||||
left: 'auto' // Left position relative to parent in px
|
left: 'auto' // Left position relative to parent in px
|
||||||
}
|
}
|
||||||
var spinner = new Spinner(opts).spin($('#spinner')[0])
|
$('#spinner').spin(opts)
|
||||||
</script>
|
</script>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user