I've a line of code like this:
htmlcontent = htmlcontent+'<div class="checkbox" id="chkpos[j]">'+optionAlpha+'<label class="lclass"><input type="checkbox" class="checkbox" name="answer" value='+optionid+'>'+option+'</label>'+htmloptionImage+'</div>';
And ids in external css are like this:
#chkpos1{
/*position: relative;*/
margin-top: 8%;
}
#chkpos2{
/*position: relative;*/
margin-top: 26%;
}
#chkpos3{
/*position: relative;*/
margin-top: 17%;
}
How can I make that javascript code ('<div class="checkbox" id="chkpos[j]">') access those ids?
Any ideas?
[and]characters in the id attribute.