jquery ajax needs type instead of method. fixes #37