debug js to arrange images on mobile