[javascript] add id to dynamically created <div>