Don't use setAttribute with data-value. Use divEle.dataset.value