wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Stop jQuery animation in progress. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Stop jQuery animation in progress." Watch "Stop jQuery animation in progress." New topic
Author

Stop jQuery animation in progress.

William Rouse
Ranch Hand

Joined: Apr 12, 2006
Posts: 73
In playing with jQuery to understand it better in a doing way, I made a project for myself to have a square move from right to left in the browser and then back again. So far I was able to make a function that does one iteration and another that resets the square but before I try to understand how to keep the loop continuously I was hoping to write code to stops the animation with another click event, but don’t know how to do that. If you can please point me where to look for clues?
Here is the code I have written so far.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60781
    
  65

.stop()


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
William Rouse
Ranch Hand

Joined: Apr 12, 2006
Posts: 73
That ease Mr. Bibeault, thank you. I guess I can now move on to the hard part and write a continous loop.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60781
    
  65

Not sure why you fee that you need a loop. You can just queue up the animations.
William Rouse
Ranch Hand

Joined: Apr 12, 2006
Posts: 73
Bear:
I got to learn new ways to think, I guess. Let me grab your book from a box (I'm in the middle of a slow move) and see how to do that. Thanks for the clues.
William Rouse
Ranch Hand

Joined: Apr 12, 2006
Posts: 73
I tried this experiment in the file listed below. It is some progress but not at all what I expected. I can't stop it or reset it. The div hesitates before it starts.
Do you think I am on the right track? I started to read about queues to see if I need to purge something.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Stop jQuery animation in progress.
 
Similar Threads
Max-height not working properly in mozilla and chrome
Animation and effects in JQuery
KeyListener woes
Implmenting marquee
Moon Lander