Fixed a bug of jQuery code.