1 Reply Latest reply on Nov 27, 2012 11:37 AM by elainecc

    How can i Use the symbols from the main html page?

    EranLev

      Hello!

       

      Im trying to find a solution for days!!

       

      i need to use my symbols from the html page, for example to hide the symbol i want to use: sym.$( "sym1" ).hide(); or to make it draggable (with jquery UI) i wanna use: sym.$( "sym1" ).draggable(); but it doesn't work.

       

      i know i can do the same from the edgeActions.js file and here is the working code:

                 

            Symbol.bindElementAction(compId, symbolName, "document", "compositionReady", function(sym, e) {

               var ex1 = sym.$( "farmer" );

               //ex1.html( '<input type="text" />' );

              

              

               yepnope({

                   both: [

                       "libs/jquery-ui.min.js",

                       "libs/jquery-ui.css",

                ],

                   callback: function() {

                  

               ( ex1 ).draggable();

                   }

               });

       

            });

       

      but the main problem is that it's always include this file as the very last .js, so in case Im trying to use the symbols from the index.html page (For example:  ( ex1 ).draggable();  ) the variables are undefined (because it read the html first)...

       

      Please Help, Im desperate..

       

      Thank you very much!!!

       

      Eran