Funktionsaufruf verhindern

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Funktionsaufruf verhindern

    hallo erst mal,


    Ich hab eine funktion in der eine animation durchgrührt wird.
    Wenn die animation gestartet ist darf diese nicht nochmal gestartet werden solange die animation nicht zu ende ist.

    hier mal mein code:

    PHP Code:
    var animationRunning false;

    //Main funktion
    $(document).ready(function()
    {
         
        if(
    animationRunning != true)
        {    
            $(
    'div.box a').click(function() 
            {    
                
    animationRunning true;
                
    clickAnimation($(this));
            });
        }
    }); 
    funkt leider nicht, man kann bei laufender animation nochmal aufs kastl klicken und dann fliegt das quer über den bildschirm. habt ihr ne idee?

  • #2
    Originally posted by mib16 View Post
    funkt leider nicht
    Ist ja in der Form auch unsinnig.
    Du machst lediglich die Registrierung des Click-Handlers von animationRunning abhängig, nicht aber den Aufruf der Funktion clickAnimation ...


    Edit:
    Bitte beachten: http://www.php-resource.de/forum/htm...l#crossposting

    http://www.php.de/javascript-ajax-un...tml#post600394

    *close*
    Last edited by wahsaga; 20-05-2011, 17:17.
    I don't believe in rebirth. Actually, I never did in my whole lives.

    Comment

    Working...
    X