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

How do I attach a callback to a element created using createChildSymbol()

$
0
0

I have drag functionality in which I want to create a custom helper so I am using a helper function that would create a element based on a symbol.  The created element has a call back that when swiped left will be destroyed.  but the callback is once in a while ( 1 out of 20 times). Here is my code snippet:

 

sym.$('.draggable').draggable({ containment: "Parent",

  helper: function(){

  var dom = [];

            // Create an instance element of a symbol as a child of the

  // given parent element

  var copyOfSym = sym.createChildSymbol($(this).attr("id").replace("Stage_Redux_","") , "Stage");

  copyOfSym.getSymbolElement().bind('swipeleft', function(event){

                                                                                   $(this).remove();

                                                                        });

 

The 'swipeleft'  does not get called consistently.

 

What am I doing wrong?

 

Thanks 


Viewing all articles
Browse latest Browse all 9897

Trending Articles



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