Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Can we add animation divs on page dynamically?

$
0
0

I am trying to dynamically add the animations on a web page.

 

I have created two sets of animations i.e. EDGE-9290207 and EDGE-26194002.

Now I have put the first animation on the page as

 

                   
  
                  

 

Now what I am trying to do is that when I click on some div, I want this animation to be replaced by another.

 

I tried 2 things 1st:

 

$('div.prefab').on('click', function () {                 $("#f1p").html('
');                  $(window).trigger("triggerEdgeAnimation"); }

 

where I have following code in my *Edge file, to handle the event:

 

$(window).bind('triggerEdgeAnimation', function () {      Edge.launchComposition(compId); });

 

 

The second approach I tried was:

 

$('div.prefab').on('click', function () {                $("#f1p").html('
');                 var myComp = AdobeEdge.getComposition("EDGE-26194002");                 myComp.play(); }

 

and finally I tried the combination of both the approaches.

 

It seems that it is not possible to put the divs at runtime and get the animation started. Am I missing something here?


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>