copy jQuery map alongside JavaScript