Friday 15 May 2015

javascript - ID Divs in For Loops -


Working in Javascript I'm trying to duplicate a div and dynamically name it for this. None of the following appear to be done:

  var origiviv = document.getElementById ("outer square"); For (i = 1; i  

Here's the bella:

The funny thing is, it only appears repeating the div inside the "outer square". If I try to reset the ID, then all this fails. Any insights will be appreciated

Thanks, Dan P.

Use sections:

   

No ID duplication, not styling problem.

By changing the ID, you can not apply the old CSS styles. The problem was the script now if you need it then you can add the ID.


No comments:

Post a Comment