Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6954171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:34:17+00:00 2026-05-27T14:34:17+00:00

I’m wondering how to stop an animation made with jQuery timers. I think I

  • 0

I’m wondering how to stop an animation made with jQuery timers. I think I have tried everything, I would really like your help.

    <!DOCTYPE html>
    <html>
        <head>
        <meta content='yes' name='apple-mobile-web-app-capable'>
        <meta content='default' name='apple-mobile-web-app-status-bar-style'>
        <meta content='width=device-width, minimum-scale=1.0, maximum-scale=1.0' name='viewport'>
        <title>HeartMath - Danmark</title>
        <script src='http://code.jquery.com/jquery.min.js' type='text/javascript'></script>
        <script src='http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js' type='text/javascript'></script>
        <script src='inc/jquery.timers-1.1.2.js' type='text/javascript'></script>
        <script type="text/javascript" > 

    jQuery.fn.log = function (msg) {
      console.log("%s: %o", msg, this);
      return this;
    };   var fixgeometry = function() {
        /* Some orientation changes leave the scroll position at something
         * that isn't 0,0. This is annoying for user experience. */
        scroll(0, 0);

        /* Calculate the geometry that our content area should take */
        var header = $(".header:visible");
        var footer = $(".footer:visible");
        var content = $(".content:visible");
        var viewport_height = $(window).height();

        var content_height = viewport_height - header.outerHeight() - footer.outerHeight();;

        /* Trim margin/border/padding height */
        content_height -= (content.outerHeight() - content.height());
        content.height(content_height);
      }; /* fixgeometry */

    $(document).ready(function() {
        $(window).bind("orientationchange resize pageshow", fixgeometry);


             var animationSpeed = 3500;
             var animationHeight = $(window).height() * 0.70;
                $("input[type='radio']").bind( "change", function(event, ui) {


                if($(this).val() == "true") {
                    startAnimation(animationSpeed);
                    $(this).log("animationen burde starte");

                } 
                else  {
                    stopAnimation();
                    $(this).log("animationen burde stopppe");
                } 

                }).log("der blev trykket"); 




                function startAnimation(animationDuration) {
                    $(".breather").everyTime(10, function(){                         
                    $(".breather").animate({top:animationHeight}, animationDuration).animate({top:"0"}, animationDuration);
                    }).log("startAnimation");
                };
                function stopAnimation() {
                    $(".breather").stopTime().stop().log("stopAnimation");

                };



    });
    </script>
        <style type="text/css">
    html, body {
        width: 100%;
    }
    div.breather {
        display: block;
        position:relative;
    }
    }
    </style>
        <link href='http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css' rel='stylesheet'>
        <link rel="stylesheet" type="text/css" href="jquery-mobile/hm-mobile-theme.css">
        </head>
        <body>
        <div data-role='page' data-theme='a'>
          <div class='header' id="header" data-role='header'> <img src="img/hm-logo.png" style="margin:0px auto;" height="40" /> </div>
          <div class='content' data-role='content'>
            <div class="breather">landscape!</div>
          </div>
          <div class='footer' data-role='footer'>
            <div data-role="fieldcontain">
              <fieldset data-role="controlgroup" data-type="horizontal">
                <input type="radio" name="ignition" id="start" value="true" />
                <label for="start">Start</label>
                <input type="radio" name="ignition" id="stop" value="false" checked="checked" />
                <label for="stop">Stop</label>
              </fieldset>
            </div>
          </div>
        </div>
    </body>
    </html>

What happens now is that when i press stop.. the animation just reverses and loops again

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:34:17+00:00Added an answer on May 27, 2026 at 2:34 pm

    When you call .stop() to stop the jQuery animation, change it to .stop(true) to clear the animation queue (docs here). I’m not sure why there is a queue, but it looks like it has something to do with the timers plugin that you are using. Use queue().length to see how many animations are left in the queue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
I would like to run a str_replace or preg_replace which looks for certain words
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I would like to count the length of a string with PHP. The string
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.