I have some codes like this:
function myFunc(name) {
var $symbol = sym.$(name);
//I want to do something with $symbol depending on their id, for example
//$item.appendTo($symbol);
//so $item will append to the corresponding symbol
}
for (var i=0; i<10; i++) {
var symbol = sym.createChildSymbol("MySymbol", sym.$(Stage"));
myFunc(symbol.getSymbolElement().attr('id')); <--not working
}
I tried .attr('id') and it seems not the id I want. Thanks for help.
EDIT: indeed I want to get the selector inside myFunc