5 Replies Latest reply on Jan 1, 2015 2:45 PM by heathrowe

    Mouseenter & mouseleave doesn't seem to work

    lfirth Level 1

      I am trying to create code that will pause the animation on mouseenter and start up again on mouseleave the stage. To test the mouseenter & mouseleave triggers I have created a text div named "test" and placed the following code at the start of my animation:

       

      sym.setVariable("sliderAutoplay", "on");

      sym.$("test").html( sym.getVariable("sliderAutoplay") );

       

      $("#Stage").mouseenter(function(){

          sym.setVariable("sliderAutoplay", "off");

          sym.$("test").html( sym.getVariable("sliderAutoplay") );

      }).mouseleave(function(){

          sym.setVariable("sliderAutoplay", "on");

          sym.$("test").html( sym.getVariable("sliderAutoplay") );

      });

       

      The initial setting of the variable "sliderAutoplay" and the setting of the "test" text works but none of the mouse events do.

       

      Any ideas?