11

私の問題は明らかです。

jquery オートコンプリートを使用していますが、なぜメッセージだけが表示されるのかわかりません。

9 results are available, use up and down arrow keys to navigate.

結果のリストを表示せずに。

これは私のコードです:

<p class="select-c">
     <label for="fcb">Location</label>
     <input id="fcb" name="fcb" type="text">                        
</p>


$("#fcb").autocomplete({
        source: function (request, response) {
            $.ajax({
                type: "GET",
                dataType: 'json',
                url: "../ws/city/" + request.term,
                async: true,
                success: function( data ) {
                    response( $.map( data, function( item,key ) {
                        return {
                            label: key,
                            value: item.id_town+"#"+item.id_province
                        }
                    }));
                },
                error: function (result) {
                    alert("Due to unexpected errors we were unable to load data");
                }
            });
        },
        minLength: 2
    });

次のような結果が得られます。

ここに画像の説明を入力

何が問題でしょうか??

4

3 に答える 3

10
  .ui-helper-hidden-accessible {
            display: none;
        }
于 2014-04-22T19:10:40.743 に答える
10

CSS を確認してください。メニュー要素を隠している可能性があります。試してみてください:

.ui-autocomplete {
  z-index: 10000000;
}
于 2013-07-02T11:07:11.603 に答える