More succinct version using jQuery