jQuery UI Autocomplete with jsfiddle echo json

http://bugs.jqueryui.com/ticket/7230

by rdworth

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/themes/base/jquery-ui.css">
<input id="autocomplete">

CSS

body{font:62.5% Verdana,Arial,sans-serif;}

JavaScript

$( "#autocomplete" ).autocomplete({
    source: function( req, resp ) {
        $.post( "/echo/json/", {
            json: '["1", "2", "3", "4", "5"]',
            delay: 1
        }, function(data) {
            resp( data );
        }, "JSON" );
    }
});