function handler() { var left = myDIV.getBoundingClientRect(); var top = myDIV.getBoundingClientRect(); if (left = 100){ left.style.left = (parseInt(left.style.left||0)+100)+"px"; } if(top = 100){ top.style.top = (parseInt(top.style.left||0)+100)+"px"; } if (left = 200) left.style.left = (parseInt(left.style.left||0)-100)+"px"; } if(top = 200){ top.style.top = (parseInt(top.style.left||0)-100)+"px"; } tell me the direction for the function to work