Navigation: getAjaxFormData: Simplify code.

Idea from: https://github.com/jquery/jquery-mobile/commit/0d4e839#commitcomment-2811047