update js position