Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 87158

Re: Accessing into element of a child symbol with array

$
0
0

Thanks for your answers.

 

First I try:

sXef.$("xef").on("click", function(){

     alert("Hola" + fXefs[i].nom);

});

but:

Uncaught TypeError: Cannot read property 'nom' of undefined

 

And after I tried:

var nom = fXefs[i].nom;

sXef.$("xef").on("click", function(){

     alert("Hola " + nom);});

but when click on any chef then show the name of the last chef of For loop (the last of array)!

 

The problem for to make custom events for every instance using variables is not solved yet.

 

And I have problem accessing to elements inside instances with custom code events, if I try:

sXef.$("xef").on("click", function(){

     sXef.$("dates").css("display","block"); //nothing happens

     sXef.$("nom").html("hola"); //nothing happens

     alert("Hola"); //work

});

nothing happens and no errors in console, for to reference elements inside is not necessary something like this or parent? all other things outside events work perfectly, the symbol instance are created and with the For loop I change photo and name dynamically without problems.


Viewing all articles
Browse latest Browse all 87158

Trending Articles



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