I am trying to append to a html element, but for some reason it doesn't appear to allow me to do so when the element has [0]
in its id name.
HTML
<div id="stuff[0]">
<div id="tag">blah</div>
</div>
<div id="stuff[1]">
<div id="tag">blah</div>
</div>
JQUERY
var id = "#" + "stuff[0]";
$(id).append("<p>HI</p>");
When I run the code it doesn't append? What is the workaround for this?
Code can also be found in the fiddle