var m1 = document.getElementById('fortphoto').closest('.module'); var m2 = document.getElementById('csgophoto').closest('.module');