8 Replies Latest reply on Sep 20, 2013 8:35 PM by ladobeugm

    Insert JQuery .html into text field nested inside of symbol

    ladobeugm Level 1

      This is one of those, 'it should be so simple....so of course, it's not' question.


      Got a nested symbol. Rather simple one. Inside the symbol is a background rectangle and a text field. When I click a button, it should insert the HTML I give it from the click event.


      Now initially I did this by just using the text field by itself. No nesting. This is the code:



      sym.$("copy").html("Edge Rocks!");

      OK, success! The text loaded just fine.


      Now let's insert that text field inside of a symbol. And let's call that symbol 'content'.


      Now I try....



      sym.$("content").$("copy").html("Some new text");


      Result? Nothing.


      Tried using stage instead of sym and even added a var stage = sym.getComposition().getStage() statement before that. Nope.


      Yea, they don't make it easy. So what's the solution?


      Here's my example file.




      BTW, ran this in Firebug's console. No errors.