Get id of div from its class name
document.getElementsByClassName('myClassName')[0].id
or
document.querySelector('.myClassName').id
document.getElementsByClassName('myClassName')[0].id
or
document.querySelector('.myClassName').id