modified example to use jQuery