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 6758483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:47:45+00:00 2026-05-26T13:47:45+00:00

I have a little animation that makes elements bob up and down. Each element

  • 0

I have a little animation that makes elements bob up and down. Each element bobs at a slightly different speed and amount.
I’m using Jquery Timers (http://plugins.jquery.com/project/timers) everyTime function to infinitely loop the animation.

I’ve successfully got the elements to bob up and down, but I can’t get them to stop using the stopTime() function.

Here is what I have so far:

function randomFromTo(from, to){
   return Math.floor(Math.random() * (to - from + 1) + from);
}

    function bobbing(command){

       if(command=='start'){
          $("#scroller .feature-headline").each(function (i) {
             $(this).everyTime(1, 'bobbing', function (){
                var bobAmount = randomFromTo(5, 10);
                var bobSpeed = randomFromTo(1200, 2000);
                $(this).animate ({marginTop: bobAmount}, bobSpeed, 'linear').animate ({marginTop: 0}, bobSpeed, 'linear');
             });
          });
       } else {
          $("#scroller .feature-headline").each(function (i) {
             $(this).stopTime('bobbing');
          });
       }

    }

Where am I going wrong?

  • 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-26T13:47:45+00:00Added an answer on May 26, 2026 at 1:47 pm

    This tutorial makes a distinction between stopping the timer and stopping the animation. It’s example to completely stop the animation is

    $( "#ball_holder").stop(true).stopTime();
    

    …so I would try

    $(this).stop(true).stopTime('bobbing');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a little animation that resembles the coverflow itunes uses as a
I have a custom usercontrol that does a little animation on a DispatcherTimer tick,
I have a little issue concerning an animation-effect which loads a certain div into
I have a custom NSView subclass that I want to animate with Core Animation.
How does Google do the little animation that replace the Google logo every day?
I'm having a little problem with jQuery ajax and an animation. I have a
So I have a little form ( #edit_form ) with elements from a database.
I have a little iPhone app that loads data from a web service. To
I have a silly little game that I made just for myself, but I
I have a little function that toggles my content from the left to the

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.