This is a discussion on "Simple shake effect problem" within the JavaScript Forum section. This forum, and the thread "Simple shake effect problem are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Simple shake effect problem
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
||||
|
Hi
I'm a newbie in javascript, I created a simple shake effect with javascript, but the problem is that this effect only one time works, how can i make it work every click on the text ?
Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
|
|
|
|
||||
|
Re: Simple shake effect problem
The reason this only works once is becuase var 'i' eventually becomes less than one and the recursive function calls never stop.
You can fix this by having a function that will reset 'i' if is less than 1 and clear the timeouts. This essentially starts it all again.
Cheers,
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
||||
|
Re: Simple shake effect problem
Thanks !
Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
|
|
||||
|
Re: Simple shake effect problem
god i hate these
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
||||
|
Re: Simple shake effect problem
Hate What ?!
Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
|
|
||||
|
Re: Simple shake effect problem
Shake effects, they do my nut in!
May be alright for what you're doing though, so i'll shup
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] simple div problem | hhelen | Web Page Design | 5 | Apr 4th, 2008 14:56 |
| CSS Ordered List (Rollover Effect) Problem in I.E 6 | Aaron1988 | Web Page Design | 0 | Mar 10th, 2008 03:56 |
| Simple Problem Please Help! | bthomson82 | JavaScript Forum | 3 | Jun 22nd, 2007 02:59 |
| Really simple positioning problem :( | camcool21 | Web Page Design | 4 | Dec 30th, 2006 18:25 |