2017-02-18 42 views
-1

我使用jquery autocomple内部引导模型,但它没有正确显示。但是,如果我没有使用它的模型,它工作正常。我认为这是CSS的问题,但我不知道它是什么。jquery自动完成不工作在引导模型

谢谢,

+0

喜Xchamp,我们需要看到你的代码。请给我们一个你现在拥有的[mcve] –

回答

0

这是z-index和位置相对问题。请尝试在下面的code.Please编辑您的问题,并添加您使用的代码,如果它没有帮助。

.ui-autocomplete { 
 
    z-index: 5000; 
 
}

0

做这样的:

$("#autocomplete") 
    .appendTo($("#divWhereAutoCompleteIsEmbeded")) 
    .autocomplete({ 
    source: function (query, result) { 
     //some fetching routine 
     }, 
    appendTo: $("#divWhereAutoCompleteIsEmbeded"), 
    minLength: 2 
});