Try to write a little game in JS using jQuery and I have to generate blocks with js can somebody give me advice how I can do it? Thanks for any help. Have to look something like this http://codepen.io/Kuzyo/pen/zhJxH
To create new element I used document.createElement method.
After that should set property className to “bricks”
end on the end append new element to relevant conteinter, in your case #field div.
One thing makes me curious. Why the margin of first (not added) elements is bigger than set (1px?)