var nleft = (e.pageX-x); var qqq = parseInt($('#in').css('left')); $('#in').css('left', (qqq+nleft));