lundi 2 mars 2015

Accessing Dynamically create div via js


I have created a tiny little script to fetch data from a json database, then insert said data into dynamically created divs in the browser. Only when i search for them using "document.getElementById();", among other ways to get them, I end up being unable to use methods to add styles, animations etc.


Just to give you more info I am using the basic xhr object and a for loop to dynamically create said divs and img tags within them. But cannot seem to either access them and or access the methods one can usually call on a variable cached dom object to edit it in some way.





Aucun commentaire:

Enregistrer un commentaire