twitter/typeahead.js — pull request #323 by lukekarrys (2013-07-03 18:39:35+00:00)
Title: Add ajaxSettings to remote options

This allows for an an object called `ajaxSettings` to be set in the remote options which allows arbitrary setting of options that will be passed to the `jQuery.ajax` request.

I had the specific need for this because I needed to set the `jsonp` on the jQuery request to override the name of the callback function.

I figured rather than adding another setting to the `remote` options, it might be better to have a catchall that would allow the setting of any of the properties allowed [in the jQuery ajax docs](http://api.jquery.com/jQuery.ajax/).

Also I made it so any specific option set in the `remote` options will override anything in `ajaxSettings` if they have the same key.

Sorry for the lack of tests. I couldn't get the jasmine mock ajax stuff to play nice with jsonp. The `mostRecentAjaxRequest()` was always coming back null.