JQuery.fx.interval controlled by UI Slider help?
I am building a website using a lot of animations but I have to limit the animations to jQuery.fx.interval = 100; so the CPU isn't maxed out at 100%. Since the animation speeds are slower. My goal is to have have a slider on my page so any user can control jQuery.fx.interval either by sliding it higher or lowering it to 0? I figured out how to stop the animations, but now I have to start it back up. How do I achieve this? Thanks
- $(function() {
- jQuery.fx.interval = 100;
- $( "#slider-range-min" ).slider({
- range: "min",
- value: 100,
- min: 0,
- max: 1000,
- slide: function( event, ui ) {
- $( "#amount" ).val( ui.value );
- $(':animated').stop();
- jQuery.fx.interval = ui.value;
- },
- });
- $( "#amount" ).val( $( "#slider-range-min" ).slider( "value" ));
- });