6 Replies Latest reply on Apr 24, 2014 8:31 AM by JRHall

    Set a variable with an element's position and use it to trigger an event

    JRHall

      Hi Edge-Heads,

       

      I want to use the position of a draggable object to trigger another object to hide/show.

       

      I have tried setting up a variable using jquery .position() and then testing that variable.

       

      This is in compositionReady;

       

      var pos = ("draggable").position();

       

      if (pos >= 850) {

           sym.$("obj1").hide();

           sym.$("obj2").show();

      }

       

      This does not appear to work...

       

      Thanks,

      Justin