0 Replies Latest reply on Jun 15, 2015 5:54 AM by dennis_helbig

    Access SVG a second or multiple times

    dennis_helbig

      Hi,

      I try to access a SVG element for a second time. What it the code snipped for this?

       

      On document.compositionReady, I access it for the first time and do a few things inside. Works like a charm.

      Now I want to access it a second time, in an other part of my composition (I would like to do this multiple times, with different events and triggers on timeline).

       

      First time (simplified it, there's a lot more going on in real):

       

      EC.SVG.accessSVG(sym.$("background")).done(

            function(svgDocument){

                     var all = svgDocument.getElementsByClassName("top"),svgDocument;

                     all.hide();

              }

      );

       

      Second time??? (the code below won't work)


      EC.SVG.accessSVG(sym.$("background")).done(

            function(svgDocument){

                     var all = svgDocument.getElementsByClassName("top"),svgDocument;

                     all.fadeIn(500);

              }

      );

       

      Any idea what code line would work to access the SVG the second time?

       

      Thank you all in advance!