JQuery.fx.interval controlled by UI Slider help?

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

  1. $(function() {
  2. jQuery.fx.interval = 100;
  3.     $( "#slider-range-min" ).slider({
  4.         range: "min",
  5.         value: 100,
  6.         min: 0,
  7.         max: 1000,
  8.         slide: function( event, ui ) {
  9.          $( "#amount" ).val( ui.value );
  10. $(':animated').stop();
  11. jQuery.fx.interval = ui.value;
  12.         },
  13.     });
  14.     $( "#amount" ).val( $( "#slider-range-min" ).slider( "value" ));
  15. });