Forums

  • # June 27, 2013 at 8:18 am

    Hi, guys

    Here is my script http://codepen.io/Kuzyo/pen/dEtnp , there is setInterval and I want to clearInterval after you click on a button. Everything works if setInterval 500-1000ms, but when I change it on 200 buttonv continues jumps. I read somewhere that setInterval can be rewrite to setTimeout and I wondering if it can fix my problem? Thnaks for reply

    # June 27, 2013 at 9:10 am

    clear the interval and after that add

    $button.stop();

    Edit : @CrocoDillon beat me to it.

    # June 27, 2013 at 10:38 am

    Thanks @CrocoDillon, @pixelgrid fixed with $button.stop(true, true);

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag