On Jul 11, 4:55 pm, tlob <[EMAIL PROTECTED]> wrote:
...
> I know a way, by altering the array behind it with PHP. But that is
> not the KISS concept. I like "keep it simple and stupid". There should
> a way to pause all action on the site with jQuery. Could I use 
> thehttp://blog.mythin.net/projects/jquery.phpPause Plugin for jQuery and
> bind it to the link? What would u suggest?

fadeOut (and similar) are implemented in terms of the setTimeout()
function, which comes built-in to browser-side JS engines. Once code
is sent to the setTimeout() queue, there is no way for client code
(that is, our code) to mess with it. It is fire and forget, so to say.
Therefore there is no way for jQuery (nor any other pure JS library)
to directly manipulate code running via setTimeout().

One option is to re-implement fadeOut() with a custom function, and
have that custom function check some sort of flag on each iteration.
If that flag is in place (which you can set in your click handler)
then you can abort or change the fade-out process. i'm not at all
recommending that this behaviour be put into jQuery itself, as it is
much too use-case-specific, but it would be one option for solving
your problem.

Reply via email to