自动完成显示在“模态"弹出窗口的后面 [英] Auto complete Appearing behind the Modal popup
本文介绍了自动完成显示在“模态"弹出窗口的后面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用简单的jquery弹出窗口和 jQuery自动完成的自动完成.自动完成的代码是像这样的东西.
I am using simple jquery popup and Auto complete of jQuery Auto complete .The code of Auto complete is something like this.
$("#tags").autocomplete({
source: NameArray
});
其中标签是文本框ID,而NameArray是字符串数组.但是,此代码在Modal弹出窗口中是这样的-
where tags is the textbox id and NameArray is Array of string.However this code in the Modal pop-up like this-
function openFilterPopUp() {
$("#tags").autocomplete({
source: NameArray
});
$("#openFilterPopUp").dialog({
resizable: false,
height: 240,
modal: true,
buttons: {
"ok": function() { $(this).dialog("close"); },
Cancel: function() { $(this).dialog("close"); }
}
});
}
自动完成"数据看起来不错,但出现在弹出窗口的后面.请帮助.任何帮助将不胜感激.
The data for Autocomplete is appearing fine but its appearing behind the popup.Please Help. Any help will be appreciated.
推荐答案
添加自动完成的appendTo属性
Add appendTo property of autocomplete
$("#tags").autocomplete({
source: NameArray,
appendTo : _parentElement
});
_parentElement可以是您的模态主体
_parentElement can be your modal body
这篇关于自动完成显示在“模态"弹出窗口的后面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文