update jQuery library
refactor code