Changed to use jquery event.