bootstrap-ajax-typeahead icon indicating copy to clipboard operation
bootstrap-ajax-typeahead copied to clipboard

jsonP support?

Open vsbatista opened this issue 11 years ago • 1 comments

Does it have support for jsonp support? I have tried to use the dataType: jsonp in the ajax call, however, its not working? Thanks!

vsbatista avatar Oct 24 '14 12:10 vsbatista

It appears that if jQuery discovers the string "callback=?" in the url it makes the request JSONP.

$("input.typeahead").typeahead({
    ajax: {
        url: "https://example.com/json?callback=?",
        method: "get"
    }
});

That is how I got typeahead to do JSONP calls.

xocekim avatar Jul 09 '15 23:07 xocekim