0 Replies Latest reply on Sep 1, 2014 3:51 AM by jamesfootlight

    Can this code be combined to be shorter?

    jamesfootlight Level 1

      Is it possible to combine these two so I don;t have to write it out for each fadeIn/fadeOut toggle?


      // Set a toggle to hide or show an element

      if (sym.getComposition().getStage().getSymbol("TIMELINE").$("RBS_timeline").is(":visible")) {

        sym.getComposition().getStage().getSymbol("TIMELINE").$("RBS_timeline").fadeOut();

      } else {

        sym.getComposition().getStage().getSymbol("TIMELINE").$("RBS_timeline").fadeIn();

      }

      // insert code for mouse click here

       

       

      // Set a toggle to hide or show an element

      if (sym.getComposition().getStage().getSymbol("TIMELINE").$("apps1").is(":visible")) {

        sym.getComposition().getStage().getSymbol("TIMELINE").$("apps1").fadeOut();

      } else {

        sym.getComposition().getStage().getSymbol("TIMELINE").$("apps1").fadeIn();

      }